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() {
|
2002-05-03 22:16:29 +02:00
|
|
|
%R = rem float 12.45, 123.213
|
|
|
|
ret float %R
|
|
|
|
}
|
|
|
|
|
2003-06-29 01:23:34 +02:00
|
|
|
double %test4() {
|
2002-05-03 22:16:29 +02:00
|
|
|
%R = rem double 312.20213123, 12.3333412
|
|
|
|
ret double %R
|
|
|
|
}
|