remtest.ll 617 B

123456789101112131415161718192021222324
  1. ; Ensure constant propagation of remainder instructions is working correctly.
  2. ; RUN: opt < %s -constprop -die -S | not grep rem
  3. define i32 @test1() {
  4. %R = srem i32 4, 3 ; <i32> [#uses=1]
  5. ret i32 %R
  6. }
  7. define i32 @test2() {
  8. %R = srem i32 123, -23 ; <i32> [#uses=1]
  9. ret i32 %R
  10. }
  11. define float @test3() {
  12. %R = frem float 0x4028E66660000000, 0x405ECDA1C0000000 ; <float> [#uses=1]
  13. ret float %R
  14. }
  15. define double @test4() {
  16. %R = frem double 0x4073833BEE07AFF8, 0x4028AAABB2A0D19C ; <double> [#uses=1]
  17. ret double %R
  18. }