Changes in directory llvm/test/Assembler:
2007-02-01-UpgradeShift.ll added (r1.1) 2003-05-21-MalformedShiftCrash.llx updated: 1.5 -> 1.6 --- Log message: Changes to support making the shift instructions be true BinaryOperators. This feature is needed in order to support shifts of more than 255 bits on large integer types. This changes the syntax for llvm assembly to make shl, ashr and lshr instructions look like a binary operator: shl i32 %X, 1 instead of shl i32 %X, i8 1 Additionally, this should help a few passes perform additional optimizations. --- Diffs of the changes: (+20 -2) 2003-05-21-MalformedShiftCrash.llx | 4 ++-- 2007-02-01-UpgradeShift.ll | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) Index: llvm/test/Assembler/2007-02-01-UpgradeShift.ll diff -c /dev/null llvm/test/Assembler/2007-02-01-UpgradeShift.ll:1.1 *** /dev/null Thu Feb 1 20:16:33 2007 --- llvm/test/Assembler/2007-02-01-UpgradeShift.ll Thu Feb 1 20:16:22 2007 *************** *** 0 **** --- 1,18 ---- + ; Test that upgrading shift instructions and constant expressions works + ; correctly. + ; RUN: llvm-upgrade < %s | grep 'ashr i32 .X, 2' && + ; RUN: llvm-upgrade < %s | grep 'lshr i32 .X, 2' && + ; RUN: llvm-upgrade < %s | grep 'shl i32 .X, 2' && + ; RUN: llvm-upgrade < %s | grep 'ashr i32 .X, 6' && + ; RUN: llvm-upgrade < %s | grep 'lshr i32 .X, 1' && + ; RUN: llvm-upgrade < %s | grep 'shl i32 .X, 1' + + void %test(int %X) { + %A = ashr int %X, ubyte 2 + %B = lshr int %X, ubyte 2 + %C = shl int %X, ubyte 2 + %D = ashr int %X, ubyte trunc ( int shl (int 3, ubyte 1) to ubyte ) + %E = lshr int %X, ubyte trunc ( int ashr (int 3, ubyte 1) to ubyte ) + %F = shl int %X, ubyte trunc ( int lshr (int 3, ubyte 1) to ubyte ) + ret void + } Index: llvm/test/Assembler/2003-05-21-MalformedShiftCrash.llx diff -u llvm/test/Assembler/2003-05-21-MalformedShiftCrash.llx:1.5 llvm/test/Assembler/2003-05-21-MalformedShiftCrash.llx:1.6 --- llvm/test/Assembler/2003-05-21-MalformedShiftCrash.llx:1.5 Fri Jan 26 02:25:05 2007 +++ llvm/test/Assembler/2003-05-21-MalformedShiftCrash.llx Thu Feb 1 20:16:22 2007 @@ -1,4 +1,4 @@ ; Found by inspection of the code -; RUN: llvm-as 2>&1 < %s > /dev/null | grep "Shift constant expression" +; RUN: llvm-as 2>&1 < %s > /dev/null | grep "Logical operator requires integral" -global i32 ashr (float 1.0, i8 2) +global i32 ashr (float 1.0, float 2.0) _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits