HomePhabricator

[MachineCSE] Prevent CSE of non-local convergent instrs

Authored by mkitzan on Apr 23 2021, 3:03 PM.

Description

[MachineCSE] Prevent CSE of non-local convergent instrs

At the moment, MachineCSE allows CSE-ing convergent instrs which are
non-local to each other. This can cause illegal codegen as convergent
instrs are control flow dependent. The patch prevents non-local CSE of
convergent instrs by adding a check in isProfitableToCSE and rejecting
CSE-ing if we're considering CSE-ing non-local convergent instrs. We
can still CSE convergent instrs which are in the same control flow
scope, so the patch purposely does not make all convergent instrs
non-CSE candidates in isCSECandidate.

https://reviews.llvm.org/D101187

Details

Committed
mkitzanApr 23 2021, 4:44 PM
Parents
rGfc88d927e30d: [clang][amdgpu] Use implicit code object version
Branches
Unknown
Tags
Unknown