diff options
| author | Alexey Bataev <a.bataev@hotmail.com> | 2017-10-09 17:14:03 +0000 |
|---|---|---|
| committer | Alexey Bataev <a.bataev@hotmail.com> | 2017-10-09 17:14:03 +0000 |
| commit | aadc2331e42008ace6b254d02a2ccee7fd656bfc (patch) | |
| tree | 5009aab8784d2a40f71ab9a5656ade0d6a72b27a /llvm/test | |
| parent | a0b02833bc5a5fce97f8fdb9cad8a1b462252bf9 (diff) | |
| download | bcm5719-llvm-aadc2331e42008ace6b254d02a2ccee7fd656bfc.tar.gz bcm5719-llvm-aadc2331e42008ace6b254d02a2ccee7fd656bfc.zip | |
[SLP] Test for wrongly vectorized set of extractelements, NFC.
llvm-svn: 315217
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/Transforms/SLPVectorizer/X86/blending-shuffle.ll | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/blending-shuffle.ll b/llvm/test/Transforms/SLPVectorizer/X86/blending-shuffle.ll index 55e479a4262..22dfffa722a 100644 --- a/llvm/test/Transforms/SLPVectorizer/X86/blending-shuffle.ll +++ b/llvm/test/Transforms/SLPVectorizer/X86/blending-shuffle.ll @@ -134,3 +134,33 @@ define i8 @k(<4 x i8> %x) { %3 = sdiv i8 %1, %2 ret i8 %3 } + +define i8 @k_bb(<4 x i8> %x) { +; CHECK-LABEL: @k_bb( +; CHECK-NEXT: br label [[BB1:%.*]] +; CHECK: bb1: +; CHECK-NEXT: [[TMP1:%.*]] = mul <4 x i8> [[X:%.*]], [[X]] +; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <4 x i8> [[TMP1]], <4 x i8> undef, <2 x i32> <i32 0, i32 1> +; CHECK-NEXT: [[TMP3:%.*]] = mul <4 x i8> [[X]], [[X]] +; CHECK-NEXT: [[TMP4:%.*]] = shufflevector <4 x i8> [[TMP3]], <4 x i8> undef, <2 x i32> <i32 3, i32 2> +; CHECK-NEXT: [[TMP5:%.*]] = add <2 x i8> [[TMP2]], [[TMP4]] +; CHECK-NEXT: [[TMP6:%.*]] = extractelement <2 x i8> [[TMP5]], i32 0 +; CHECK-NEXT: [[TMP7:%.*]] = extractelement <2 x i8> [[TMP5]], i32 1 +; CHECK-NEXT: [[TMP8:%.*]] = sdiv i8 [[TMP6]], [[TMP7]] +; CHECK-NEXT: ret i8 [[TMP8]] +; + %x0 = extractelement <4 x i8> %x, i32 0 + br label %bb1 +bb1: + %x3 = extractelement <4 x i8> %x, i32 3 + %x1 = extractelement <4 x i8> %x, i32 1 + %x2 = extractelement <4 x i8> %x, i32 2 + %x0x0 = mul i8 %x0, %x0 + %x3x3 = mul i8 %x3, %x3 + %x1x1 = mul i8 %x1, %x1 + %x2x2 = mul i8 %x2, %x2 + %1 = add i8 %x0x0, %x3x3 + %2 = add i8 %x1x1, %x2x2 + %3 = sdiv i8 %1, %2 + ret i8 %3 +} |

