[PATCH] DAGCombiner: Fold a shuffle on CONCAT_VECTORS into a new CONCAT_VECTORS if possible.

Jim Grosbach grosbach at apple.com
Tue Apr 9 10:24:38 PDT 2013


  Yes, the output code is now significantly better than it was before.

  The patch itself looks great to me. A few minor things on the testcase inline.


================
Comment at: test/CodeGen/ARM/dagcombine-concatvector.ll:4
@@ +3,3 @@
+target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32-S32"
+target triple = "thumbv7s-apple-ios3.0.0"
+
----------------
Nuke the datalayout and triple lines and just specify explicitly on the llc run line.

May be worth double-checking the AAPCS codegen as well. The calling convention for floating point (and vectors) is different there, so it's possible there's different concerns.

================
Comment at: test/CodeGen/ARM/dagcombine-concatvector.ll:10
@@ +9,3 @@
+; CHECK: vst1.8
+; CHECK-NEXT: bx lr
+define void @test1(i8* %dst, [4 x i64] %vec.coerce) {
----------------
The codegen now is pretty much optimal for Darwin, so for the testcase I suggest explicitly checking for the exact codegen. We don't want to regress again from what we'll have with this patch.

The CHECK lines should look for the whole instruction, including operands, not just the mnemonics. Part of what we're testing here is that our codegen and sroa play nicely with the calling convention.


http://llvm-reviews.chandlerc.com/D647



More information about the llvm-commits mailing list