diff options
Diffstat (limited to 'test/Transforms/ConstProp/remtest.ll')
-rw-r--r-- | test/Transforms/ConstProp/remtest.ll | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/Transforms/ConstProp/remtest.ll b/test/Transforms/ConstProp/remtest.ll new file mode 100644 index 0000000..efd2d48 --- /dev/null +++ b/test/Transforms/ConstProp/remtest.ll @@ -0,0 +1,24 @@ +; Ensure constant propagation of remainder instructions is working correctly. + +; RUN: opt < %s -constprop -die -S | not grep rem + +define i32 @test1() { + %R = srem i32 4, 3 ; <i32> [#uses=1] + ret i32 %R +} + +define i32 @test2() { + %R = srem i32 123, -23 ; <i32> [#uses=1] + ret i32 %R +} + +define float @test3() { + %R = frem float 0x4028E66660000000, 0x405ECDA1C0000000 ; <float> [#uses=1] + ret float %R +} + +define double @test4() { + %R = frem double 0x4073833BEE07AFF8, 0x4028AAABB2A0D19C ; <double> [#uses=1] + ret double %R +} + |