[llvm] r348380 - [X86] Add test case to show missed opportunity to combine a concat_vector into a scalar_to_vector. NFC

Andrea Di Biagio via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 5 08:23:28 PST 2018


Author: adibiagio
Date: Wed Dec  5 08:23:27 2018
New Revision: 348380

URL: http://llvm.org/viewvc/llvm-project?rev=348380&view=rev
Log:
[X86] Add test case to show missed opportunity to combine a concat_vector into a scalar_to_vector. NFC

This is a test for D55274.

Added:
    llvm/trunk/test/CodeGen/X86/combine-concatvectors.ll

Added: llvm/trunk/test/CodeGen/X86/combine-concatvectors.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/combine-concatvectors.ll?rev=348380&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/combine-concatvectors.ll (added)
+++ llvm/trunk/test/CodeGen/X86/combine-concatvectors.ll Wed Dec  5 08:23:27 2018
@@ -0,0 +1,20 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -mtriple=x86_64-unknown-unknown -mattr=+avx < %s | FileCheck %s
+
+define void @PR32957(<2 x float>* %in, <8 x float>* %out) {
+; CHECK-LABEL: PR32957:
+; CHECK:       # %bb.0:
+; CHECK-NEXT:    vmovsd {{.*#+}} xmm0 = mem[0],zero
+; CHECK-NEXT:    vxorps %xmm1, %xmm1, %xmm1
+; CHECK-NEXT:    vblendps {{.*#+}} xmm0 = xmm0[0,1],xmm1[2,3]
+; CHECK-NEXT:    vmovaps %ymm0, (%rsi)
+; CHECK-NEXT:    vzeroupper
+; CHECK-NEXT:    retq
+  %ld = load <2 x float>, <2 x float>* %in, align 8
+  %ext = extractelement <2 x float> %ld, i64 0
+  %ext2 = extractelement <2 x float> %ld, i64 1
+  %ins = insertelement <8 x float> <float undef, float undef, float 0.0, float 0.0, float 0.0, float 0.0, float 0.0, float 0.0>, float %ext, i64 0
+  %ins2 = insertelement <8 x float> %ins, float %ext2, i64 1
+  store <8 x float> %ins2, <8 x float>* %out, align 32
+  ret void
+}




More information about the llvm-commits mailing list