[PATCH] D47346: [X86] Add a new pass to fold extension into load instructions in previous BB

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 24 17:56:31 PDT 2018


chandlerc added a comment.

We have an MI combine pass IIRC -- why not put this there? (Genuine question, haven't looked at these enough to know if that doesn't work...)



================
Comment at: test/CodeGen/X86/fold-xbb-ext-load.ll:8-15
+; CHECK:        movzwl  a, %esi
+; CHECK-NEXT:   calll   v1
+; CHECK-NEXT:   jmp     .LBB0_3
+; CHECK-NEXT: .LBB0_2:
+; CHECK-NEXT:   movzwl  a+2, %esi
+; CHECK-NEXT:   calll   v2
+; CHECK-NEXT: .LBB0_3:
----------------
Can you craft yoru test case to be reasonable to read with the automatically generated CHECK lines? That always makes maintenance easier *if* the result is readable... not sure if these will be.

You might need to break this apart into separate functions to make it read better.


Repository:
  rL LLVM

https://reviews.llvm.org/D47346





More information about the llvm-commits mailing list