[PATCH] D107923: [X86] X86DAGToDAGISel::matchBitExtract(): support 'num high bits to clear' pattern
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 7 11:37:38 PDT 2021
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:3576
+ SDValue BitWidthC =
+ CurDAG->getConstant(NVT.getScalarSizeInBits(), DL, MVT::i32);
+ insertDAGNode(*CurDAG, SDValue(Node, 0), BitWidthC);
----------------
NVT is a scalar isn't it? So this could just be getSizeINBits()?
================
Comment at: llvm/test/CodeGen/X86/clear-highbits.ll:943
+; X86-BMI2-NEXT: movl $32, %eax
+; X86-BMI2-NEXT: subl %ebx, %eax
+; X86-BMI2-NEXT: bzhil %eax, {{[0-9]+}}(%esp), %eax
----------------
This doesn't seem better. But maybe it increases parallelism the if the shrxl use wasn't a call?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107923/new/
https://reviews.llvm.org/D107923
More information about the llvm-commits
mailing list