Renamed `as' => `llvm-as', `dis' => `llvm-dis', `link' => `llvm-link'.
[oota-llvm.git] / test / Transforms / InstCombine / rem.ll
1 ; This test makes sure that these instructions are properly eliminated.
2 ;
3
4 ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep rem
5
6 implementation
7
8 int %test1(int %A) {
9         %B = rem int %A, 1    ; ISA constant 0
10         ret int %B
11 }
12
13 int %test2(int %A) {          ; 0 % X = 0, we don't need ot preserve traps
14         %B = rem int 0, %A
15         ret int %B
16 }
17
18 uint %test3(uint %A) {
19         %B = rem uint %A, 8   ; & 7
20         ret uint %B
21 }