2003-06-28 23:23:34 +00:00
|
|
|
; Ensure constant propagation of remainder instructions is working correctly.
|
2002-05-03 20:14:21 +00:00
|
|
|
|
2003-06-28 23:23:34 +00:00
|
|
|
; RUN: as < %s | opt -constprop -die | dis | not grep rem
|
2002-05-03 20:14:21 +00:00
|
|
|
|
2003-06-28 23:23:34 +00:00
|
|
|
int %test1() {
|
2002-05-03 20:14:21 +00:00
|
|
|
%R = rem int 4, 3
|
|
|
|
ret int %R
|
|
|
|
}
|
|
|
|
|
2003-06-28 23:23:34 +00:00
|
|
|
int %test2() {
|
2002-05-03 20:14:21 +00:00
|
|
|
%R = rem int 123, -23
|
|
|
|
ret int %R
|
|
|
|
}
|
|
|
|
|
2003-06-28 23:23:34 +00:00
|
|
|
float %test3() {
|
2002-05-03 20:16:29 +00:00
|
|
|
%R = rem float 12.45, 123.213
|
|
|
|
ret float %R
|
|
|
|
}
|
|
|
|
|
2003-06-28 23:23:34 +00:00
|
|
|
double %test4() {
|
2002-05-03 20:16:29 +00:00
|
|
|
%R = rem double 312.20213123, 12.3333412
|
|
|
|
ret double %R
|
|
|
|
}
|