[PATCH] D49262: [DAGCombiner] Call SimplifyDemandedVectorElts from EXTRACT_VECTOR_ELT

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 12 15:17:43 PDT 2018


efriedma added inline comments.


================
Comment at: test/CodeGen/AArch64/aarch64-be-bv.ll:33
-  ; CHECK-NEXT:    movi	   v[[REG2:[0-9]+]].4s, #1, lsl #16
-  ; CHECK-NEXT:    add	   v[[REG1]].8h, v[[REG1]].8h, v[[REG2]].8h
   ; CHECK-NEXT:    umov	   w{{[0-9]+}}, v[[REG1]].h[0]
----------------
RKSimon wrote:
> efriedma wrote:
> > This is nice, but it's destroying the intent of the test, which is to check that we generate the correct movi instruction.
> Am I missing something - why the extractelement - why not return the <8 x i16> add result directly?
Returning the result "directly" involves a bitcast, which is also likely to break in the future (this is big-endian, so it swaps the elements.)

Maybe store the result to memory instead.


Repository:
  rL LLVM

https://reviews.llvm.org/D49262





More information about the llvm-commits mailing list