[PATCH] D67875: [X86] X86DAGToDAGISel::matchBEXTRFromAndImm(): if can't use BEXTR, fallback to BZHI (PR43381)
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 22 11:17:51 PDT 2019
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:3441-3443
// TODO: Maybe load folding, greater than 32-bit masks, or a guarantee of LICM
// hoisting the move immediate would make it worthwhile with a less optimal
// BEXTR?
----------------
So, should we then fallback to BZHI only if we manage to fold the load?
================
Comment at: llvm/test/CodeGen/X86/bmi-x86_64.ll:28
+; BMI2-SLOW: # %bb.0:
+; BMI2-SLOW-NEXT: movl $16, %eax
+; BMI2-SLOW-NEXT: bzhil %eax, %edi, %eax
----------------
craig.topper wrote:
> This doesn't look like an obvious improvement. The movq in the original code is basically free. So it was really 2 uops. The new code is 3 uops.
That is not what mca says, i guess it's not modelled in those sched models?
Is there any particularly good intel cpu schedule model that is in LLVM i should use as reference?
But yes, that is true.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67875/new/
https://reviews.llvm.org/D67875
More information about the llvm-commits
mailing list