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