blob: 905f4b724f0473c74c2e0df906056f68718dc698 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; Ensure constant propagation of remainder instructions is working correctly.
2
3; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -die | llvm-dis | not grep rem
4
5int %test1() {
6 %R = rem int 4, 3
7 ret int %R
8}
9
10int %test2() {
11 %R = rem int 123, -23
12 ret int %R
13}
14
15float %test3() {
16 %R = rem float 12.45, 123.213
17 ret float %R
18}
19
20double %test4() {
21 %R = rem double 312.20213123, 12.3333412
22 ret double %R
23}