[PATCH] D112464: [x86] limit vector increment fold to allow load folding
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 25 12:19:48 PDT 2021
lebedev.ri added a comment.
SGTM in general.
================
Comment at: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:901
+ return X86::mayFoldLoad(N->getOperand(0)) && N->getOpcode() == ISD::ADD &&
+ Subtarget->hasAVX() && !N->getOperand(1).hasOneUse();
+ };
----------------
I'm stuck on this one-use check. Is it really reasonable?
We don't really know that the constant is used nearby, do we?
There doesn't seem to be a test for it.
https://godbolt.org/z/Ea9sad3Ya
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112464/new/
https://reviews.llvm.org/D112464
More information about the llvm-commits
mailing list