llvm-6502/test/CodeGen/PowerPC/sub-bv-types.ll
Hal Finkel bd6f1f6896 DAGCombine tryFoldToZero cannot create illegal types after type legalization
When folding sub x, x (and other similar constructs), where x is a vector, the
result is a vector of zeros. After type legalization, make sure that the input
zero elements have a legal type. This type may be larger than the result's
vector element type.

This was another bug found by llvm-stress.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185949 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-09 17:02:45 +00:00

18 lines
725 B
LLVM

; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 < %s
target triple = "powerpc64-unknown-linux-gnu"
define void @autogen_SD10521() {
BB:
%Shuff7 = shufflevector <16 x i16> zeroinitializer, <16 x i16> zeroinitializer, <16 x i32> <i32 undef, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 16, i32 18, i32 undef, i32 22, i32 undef, i32 26, i32 undef, i32 30>
br label %CF
CF: ; preds = %CF78, %CF, %BB
%I27 = insertelement <16 x i16> %Shuff7, i16 1360, i32 8
%B28 = sub <16 x i16> %I27, %Shuff7
br i1 undef, label %CF, label %CF78
CF78: ; preds = %CF
%B42 = xor <16 x i16> %B28, %Shuff7
br label %CF
}