From 4e8a136db8e1d71ff309f73785397cf372c40696 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 9 Aug 2014 01:06:56 +0000 Subject: [PATCH] R600/SI: Custom lower CONCAT_VECTORS This will lower them using register copies rather than loads and stores to the stack. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215270 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/R600/SIISelLowering.cpp | 4 +++- test/CodeGen/R600/concat_vectors.ll | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Target/R600/SIISelLowering.cpp b/lib/Target/R600/SIISelLowering.cpp index f7717dacfc6..f9be144461a 100644 --- a/lib/Target/R600/SIISelLowering.cpp +++ b/lib/Target/R600/SIISelLowering.cpp @@ -196,10 +196,12 @@ SITargetLowering::SITargetLowering(TargetMachine &TM) : case ISD::BITCAST: case ISD::EXTRACT_VECTOR_ELT: case ISD::INSERT_VECTOR_ELT: - case ISD::CONCAT_VECTORS: case ISD::INSERT_SUBVECTOR: case ISD::EXTRACT_SUBVECTOR: break; + case ISD::CONCAT_VECTORS: + setOperationAction(Op, VT, Custom); + break; default: setOperationAction(Op, VT, Expand); break; diff --git a/test/CodeGen/R600/concat_vectors.ll b/test/CodeGen/R600/concat_vectors.ll index c38f3ee99ea..753282bbe82 100644 --- a/test/CodeGen/R600/concat_vectors.ll +++ b/test/CodeGen/R600/concat_vectors.ll @@ -77,8 +77,7 @@ define void @test_concat_v4f32(<8 x float> addrspace(1)* %out, <4 x float> %a, < } ; FUNC-LABEL: @test_concat_v8f32 -; FIXME: This is currently being expanded with loads / stores to the stack. -; FIXME-SI-NOT: S_MOV_B32 s{{[0-9]}}, 0x80f000 +; SI-NOT: S_MOV_B32 s{{[0-9]}}, 0x80f000 ; SI-NOT: MOVREL define void @test_concat_v8f32(<16 x float> addrspace(1)* %out, <8 x float> %a, <8 x float> %b) nounwind { %concat = shufflevector <8 x float> %a, <8 x float> %b, <16 x i32> -- 2.34.1