blob: fd56012310babefa6cff4cd0537b8ffab6203e2a [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() {
Dale Johannesend727a2b2007-09-05 17:50:36 +000016 %R = rem float 0x4028E66660000000, 0x405ECDA1C0000000
Dan Gohmanf17a25c2007-07-18 16:29:46 +000017 ret float %R
18}
19
20double %test4() {
Dale Johannesend727a2b2007-09-05 17:50:36 +000021 %R = rem double 0x4073833BEE07AFF8, 0x4028AAABB2A0D19C
Dan Gohmanf17a25c2007-07-18 16:29:46 +000022 ret double %R
23}