[llvm] [AMDGPU] Fix opcode comparison logic for G_INTRINSIC (PR #156008)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 29 04:47:57 PDT 2025
================
@@ -4718,14 +4718,14 @@ class SearchOptions {
const MachineInstr *MI = MRI.getVRegDef(Reg);
unsigned Opc = MI->getOpcode();
- if (Opc < TargetOpcode::GENERIC_OP_END) {
- // Keep same for generic op.
- HasNeg = true;
- } else if (Opc == TargetOpcode::G_INTRINSIC) {
+ if (Opc == TargetOpcode::G_INTRINSIC) {
Intrinsic::ID IntrinsicID = cast<GIntrinsic>(*MI).getIntrinsicID();
// Only float point intrinsic has neg & neg_hi bits.
if (IntrinsicID == Intrinsic::amdgcn_fdot2)
HasNeg = true;
+ } else if (Opc < TargetOpcode::GENERIC_OP_END) {
----------------
arsenm wrote:
Should probably use TargetInstrInfo::isGenericOpcode?
If G_INTRINSIC doesn't count as isGenericOpcode, should fix that
https://github.com/llvm/llvm-project/pull/156008
More information about the llvm-commits
mailing list