[llvm] [AMDGPU] Fix GCNRewritePartialRegUses pass: vector regclass is selected instead of scalar. (PR #69957)

Carl Ritson via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 15 00:03:21 PST 2023


================
@@ -425,29 +414,41 @@ bool GCNRewritePartialRegUses::rewriteReg(Register Reg) const {
     return false;
 
   for (MachineOperand &MO : Range) {
----------------
perlfu wrote:

Presumably this could be:
`if (llvm::any_of(Range, ...`

It seems testing this here is just an optimisation?
i.e. logically it could be folded into the loop below.

https://github.com/llvm/llvm-project/pull/69957


More information about the llvm-commits mailing list