forked from OSchip/llvm-project
[InstCombine] add test for frem with 0.0 (PR34870); NFC
llvm-svn: 321460
This commit is contained in:
parent
1dd7856af5
commit
546c43fd1a
|
@ -593,3 +593,16 @@ define <2 x i32> @test23(<2 x i32> %A) {
|
||||||
%mul = srem <2 x i32> %and, <i32 2147483647, i32 2147483647>
|
%mul = srem <2 x i32> %and, <i32 2147483647, i32 2147483647>
|
||||||
ret <2 x i32> %mul
|
ret <2 x i32> %mul
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; FIXME: FP division-by-zero is not UB.
|
||||||
|
|
||||||
|
define double @PR34870(i1 %cond, double %x, double %y) {
|
||||||
|
; CHECK-LABEL: @PR34870(
|
||||||
|
; CHECK-NEXT: [[FMOD:%.*]] = frem double %x, %y
|
||||||
|
; CHECK-NEXT: ret double [[FMOD]]
|
||||||
|
;
|
||||||
|
%sel = select i1 %cond, double %y, double 0.0
|
||||||
|
%fmod = frem double %x, %sel
|
||||||
|
ret double %fmod
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue