[PATCH] D64707: [x86] try harder to form LEA from ADD to avoid flag conflicts (PR40483)
Noel Grandin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 14 23:32:12 PDT 2019
grandinj added inline comments.
================
Comment at: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:2487
+ };
+ if (isMathWithFlags(N.getOperand(0)) && isMathWithFlags(N.getOperand(1)))
+ Complexity++;
----------------
spatel wrote:
> grandinj wrote:
> > Should this not be an || condition ?
> It could be || (and I tried that initially), but I saw possible regressions (missed load folding) with that logic.
>
> Given that this is a heuristic, it's hard to determine statically when it will be profitable.
>
> Ok if I add a TODO comment about extending this in a follow-up patch? If we can recover the load folding, I agree that using || would be better.
Sounds reasonable (noting that I am just a bystander here, not a real reviewer)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64707/new/
https://reviews.llvm.org/D64707
More information about the llvm-commits
mailing list