[PATCH] D130040: [AMDGPU] Remove old operand from VOPC DPP
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 19 01:49:47 PDT 2022
foad added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:5015
+ if (!DefinedRC)
+ return false;
if (!isLegalRegOperand(MRI, OpInfo, *MO))
----------------
I guess we want to return "true" here for a case like COPY, where the source operand should be a register but has no defined RC, but "false" for operands that should be immediates. Can we distinguish these cases by looking at the OpInfo?
Having said that, I guess returning false is OK for now. It's more conservative, just prevents some folding, and in the D122737 test case that does not matter because the unfolded copy get optimized away by register allocation anyway.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130040/new/
https://reviews.llvm.org/D130040
More information about the llvm-commits
mailing list