; NOTE: Assertions have been autogenerated by update_test_checks.py
; RUN: opt < %s -instsimplify -S | FileCheck %s

define double @fdiv_of_undef(double %X) {
; CHECK-LABEL: @fdiv_of_undef(
; CHECK:         ret double undef
;
; undef / X -> undef
  %r = fdiv double undef, %X
  ret double %r
}

define double @fdiv_by_undef(double %X) {
; CHECK-LABEL: @fdiv_by_undef(
; CHECK:         ret double undef
;
; X / undef -> undef
  %r = fdiv double %X, undef
  ret double %r
}