2003-06-29 01:23:34 +02:00
|
|
|
; Ensure constant propagation of remainder instructions is working correctly.
|
2002-05-03 22:14:21 +02:00
|
|
|
|
2006-12-02 05:23:10 +01:00
|
|
|
; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -die | llvm-dis | not grep rem
|
2002-05-03 22:14:21 +02:00
|
|
|
|
2003-06-29 01:23:34 +02:00
|
|
|
int %test1() {
|
2002-05-03 22:14:21 +02:00
|
|
|
%R = rem int 4, 3
|
|
|
|
ret int %R
|
|
|
|
}
|
|
|
|
|
2003-06-29 01:23:34 +02:00
|
|
|
int %test2() {
|
2002-05-03 22:14:21 +02:00
|
|
|
%R = rem int 123, -23
|
|
|
|
ret int %R
|
|
|
|
}
|
|
|
|
|
2003-06-29 01:23:34 +02:00
|
|
|
float %test3() {
|
2007-09-05 19:50:36 +02:00
|
|
|
%R = rem float 0x4028E66660000000, 0x405ECDA1C0000000
|
2002-05-03 22:16:29 +02:00
|
|
|
ret float %R
|
|
|
|
}
|
|
|
|
|
2003-06-29 01:23:34 +02:00
|
|
|
double %test4() {
|
2007-09-05 19:50:36 +02:00
|
|
|
%R = rem double 0x4073833BEE07AFF8, 0x4028AAABB2A0D19C
|
2002-05-03 22:16:29 +02:00
|
|
|
ret double %R
|
|
|
|
}
|