diff options
author | Hal Finkel <hfinkel@anl.gov> | 2013-07-09 18:55:10 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2013-07-09 18:55:10 +0000 |
commit | b9c8c40acbe120ebf44d2a81382ceee100bcd331 (patch) | |
tree | c0c5476392e8c6b7b41750a3cb287f4c67aa7956 /test/CodeGen/PowerPC/bv-widen-undef.ll | |
parent | 7c2d8f7b5ea1d0abaed1176f87ea2509e65e82be (diff) | |
download | external_llvm-b9c8c40acbe120ebf44d2a81382ceee100bcd331.zip external_llvm-b9c8c40acbe120ebf44d2a81382ceee100bcd331.tar.gz external_llvm-b9c8c40acbe120ebf44d2a81382ceee100bcd331.tar.bz2 |
WidenVecRes_BUILD_VECTOR must use the first operand's type
Because integer BUILD_VECTOR operands may have a larger type than the result's
vector element type, and all operands must have the same type, when widening a
BUILD_VECTOR node by adding UNDEFs, we cannot use the vector element type, but
rather must use the type of the existing operands.
Another bug found by llvm-stress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185960 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PowerPC/bv-widen-undef.ll')
-rw-r--r-- | test/CodeGen/PowerPC/bv-widen-undef.ll | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/bv-widen-undef.ll b/test/CodeGen/PowerPC/bv-widen-undef.ll new file mode 100644 index 0000000..9e58f0d --- /dev/null +++ b/test/CodeGen/PowerPC/bv-widen-undef.ll @@ -0,0 +1,23 @@ +; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 < %s +target triple = "powerpc64-unknown-linux-gnu" + +define void @autogen_SD4357(i8) { +BB: + br label %CF + +CF: ; preds = %CF, %BB + br i1 undef, label %CF, label %CF77 + +CF77: ; preds = %CF81, %CF77, %CF + %Shuff12 = shufflevector <2 x i8> <i8 -1, i8 -1>, <2 x i8> <i8 -1, i8 -1>, <2 x i32> <i32 0, i32 undef> + br i1 undef, label %CF77, label %CF80 + +CF80: ; preds = %CF80, %CF77 + %B21 = mul <2 x i8> %Shuff12, <i8 -1, i8 -1> + %Cmp24 = fcmp une ppc_fp128 0xM00000000000000000000000000000000, 0xM00000000000000000000000000000000 + br i1 %Cmp24, label %CF80, label %CF81 + +CF81: ; preds = %CF80 + %I36 = insertelement <2 x i8> %B21, i8 %0, i32 0 + br label %CF77 +} |