[PATCH] D120177: [BOLT] CMOVConversion pass
Amir Ayupov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 4 23:51:58 PST 2022
Amir marked an inline comment as done.
Amir added inline comments.
================
Comment at: bolt/lib/Target/X86/X86MCPlusBuilder.cpp:2143
+ // CMOV can only be a load (filter out store-moves below)
+ if (isLoad(Inst)) {
+ // If stack memory operands are not allowed, bail early
----------------
rafauler wrote:
> If we are only converting loads and you are already filtering stores below (I guess this is done in the switch-case of line 2163), can't we just drop this if and run the checks in its body regardless of it being load/store?
No, unfortunately we can't drop it. We allow reg-reg moves, but apply filtering to loads based on `AllowStackMemOp` and `AllowBasePtrStackMemOp`. Stores are filtered by opcode.
E.g. if `AllowStackMemOp` is false, we should still allow reg-reg moves. Not sure how to drop `isLoad` check and run checks in body regardless and still allow that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120177/new/
https://reviews.llvm.org/D120177
More information about the llvm-commits
mailing list