Break up huge line so that this file is almost readable.
[oota-llvm.git] / test / Assembler / 2007-02-01-UpgradeShift.ll
1 ; Test that upgrading shift instructions and constant expressions works
2 ; correctly.
3 ; RUN: llvm-upgrade < %s | grep 'ashr i32 .X, 2' &&
4 ; RUN: llvm-upgrade < %s | grep 'lshr i32 .X, 2' &&
5 ; RUN: llvm-upgrade < %s | grep 'shl i32 .X, 2' &&
6 ; RUN: llvm-upgrade < %s | grep 'ashr i32 .X, 6' &&
7 ; RUN: llvm-upgrade < %s | grep 'lshr i32 .X, 1' &&
8 ; RUN: llvm-upgrade < %s | grep 'shl i32 .X, 1'
9
10 void %test(int %X) {
11   %A = ashr int %X, ubyte 2
12   %B = lshr int %X, ubyte 2
13   %C = shl  int %X, ubyte 2
14   %D = ashr int %X, ubyte trunc ( int shl  (int 3, ubyte 1) to ubyte )
15   %E = lshr int %X, ubyte trunc ( int ashr (int 3, ubyte 1) to ubyte )
16   %F = shl  int %X, ubyte trunc ( int lshr (int 3, ubyte 1) to ubyte )
17   ret void
18 }