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