blob: 209f831fc80aeeac01fd6aaaa9c04542d6466f9f [file] [log] [blame]
Reid Spencer69ccadd2006-12-02 04:23:10 +00001; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 &&
2; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep div
Chris Lattner871a87d2006-10-12 20:56:15 +00003
4int %test1(int %X) {
5 %tmp1 = rem int %X, 255
6 ret int %tmp1
7}
8
9int %test2(int %X) {
10 %tmp1 = rem int %X, 256
11 ret int %tmp1
12}
13
14uint %test3(uint %X) {
15 %tmp1 = rem uint %X, 255
16 ret uint %tmp1
17}
18
19uint %test4(uint %X) {
20 %tmp1 = rem uint %X, 256 ; just an and
21 ret uint %tmp1
22}
23