[llvm] [AMDGPU] Reduce use of continue in SIWholeQuadMode. NFC. (PR #93659)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed May 29 03:24:23 PDT 2024
================
@@ -499,19 +496,16 @@ char SIWholeQuadMode::scanInstructions(MachineFunction &MF,
if (TII->isWQM(Opcode)) {
// If LOD is not supported WQM is not needed.
- if (!ST->hasExtendedImageInsts())
- continue;
// Only generate implicit WQM if implicit derivatives are required.
// This avoids inserting unintended WQM if a shader type without
// implicit derivatives uses an image sampling instruction.
- if (!HasImplicitDerivatives)
- continue;
- // Sampling instructions don't need to produce results for all pixels
- // in a quad, they just require all inputs of a quad to have been
- // computed for derivatives.
- markInstructionUses(MI, StateWQM, Worklist);
- GlobalFlags |= StateWQM;
- continue;
+ if (ST->hasExtendedImageInsts() && HasImplicitDerivatives) {
+ // Sampling instructions don't need to produce results for all pixels
+ // in a quad, they just require all inputs of a quad to have been
+ // computed for derivatives.
+ markInstructionUses(MI, StateWQM, Worklist);
+ GlobalFlags |= StateWQM;
+ }
----------------
arsenm wrote:
Alternatively, remove all the else after continue?
https://github.com/llvm/llvm-project/pull/93659
More information about the llvm-commits
mailing list