blob: a3156e9a50e531dec4b2ea05ec4f790ff63af458 [file] [log] [blame]
Brian Gaeke8e0a6bf2002-10-31 23:05:22 +00001; test shifts
2void %main() {
3 %i = add int 10, 0
4 %u = add uint 20, 0
5 %shamt = add ubyte 0, 0
6 %shamt2 = add ubyte 1, 0
7 %shamt3 = add ubyte 2, 0
8 %shamt4 = add ubyte 3, 0
9 ; constantShiftAmount isRightShift isOperandUnsigned
10 ; 0 0 0
11 %temp01 = shl int %i, ubyte %shamt
12 ; 0 0 1
13 %temp02 = shl uint %u, ubyte %shamt2
14 ; 0 1 0
15 %temp03 = shr int %i, ubyte %shamt3
16 ; 0 1 1
17 %temp04 = shr uint %u, ubyte %shamt4
18 ; 1 0 0
19 %temp05 = shl int %i, ubyte 4
20 ; 1 0 1
21 %temp06 = shl uint %u, ubyte 5
22 ; 1 1 0
23 %temp07 = shr int %i, ubyte 6
24 ; 1 1 1
25 %temp08 = shr uint %u, ubyte 7
26 ret void
27}