[PATCH] D153151: [EarlyCSE] Do not CSE convergent calls with memory effects
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 21 12:54:28 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/EarlyCSE.cpp:336
// implicitly depend on the set of threads that is currently executing.
- if (CallInst *CI = dyn_cast<CallInst>(Inst); CI && CI->isConvergent()) {
- return hash_combine(
- Inst->getOpcode(), Inst->getParent(),
- hash_combine_range(Inst->value_op_begin(), Inst->value_op_end()));
- }
+ if (CallInst *CI = dyn_cast<CallInst>(Inst))
+ return hashCallInst(CI);
----------------
CallBase? Are invokes ever CSEable?
================
Comment at: llvm/test/Transforms/EarlyCSE/AMDGPU/convergent-call.ll:27
if:
; %y = ballot operation over lanes satisfying %cond.
%y1 = call i32 @llvm.read_register.i32(metadata !{!"exec_lo"}) convergent
----------------
Should still add another test that doesn't involve read_register and uses a proper convergent call
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153151/new/
https://reviews.llvm.org/D153151
More information about the llvm-commits
mailing list