Changes in directory llvm/test/Regression/Transforms/InstCombine:
bswap.ll updated: 1.1 -> 1.2 --- Log message: Add tests for 16-bit byteswaps. --- Diffs of the changes: (+15 -1) bswap.ll | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletion(-) Index: llvm/test/Regression/Transforms/InstCombine/bswap.ll diff -u llvm/test/Regression/Transforms/InstCombine/bswap.ll:1.1 llvm/test/Regression/Transforms/InstCombine/bswap.ll:1.2 --- llvm/test/Regression/Transforms/InstCombine/bswap.ll:1.1 Thu Jun 15 14:06:42 2006 +++ llvm/test/Regression/Transforms/InstCombine/bswap.ll Mon Jul 10 15:25:01 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep 'call.*llvm.bswap' | wc -l | grep 2 +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep 'call.*llvm.bswap' | wc -l | grep 4 uint %test1(uint %i) { %tmp1 = shr uint %i, ubyte 24 ; <uint> [#uses=1] @@ -26,3 +26,17 @@ ret uint %tmp14 } +ushort %test3(ushort %s) { + %tmp2 = shr ushort %s, ubyte 8 + %tmp4 = shl ushort %s, ubyte 8 + %tmp5 = or ushort %tmp2, %tmp4 + ret ushort %tmp5 +} + +ushort %test4(ushort %s) { + %tmp2 = shr ushort %s, ubyte 8 + %tmp4 = shl ushort %s, ubyte 8 + %tmp5 = or ushort %tmp4, %tmp2 + ret ushort %tmp5 +} + _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits