Skip to content

Commit 08d168c

Browse files
committed
AMDGPU/GlobalISel: Use correct type for intrinsic ID
1 parent 662b130 commit 08d168c

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

llvm/lib/Target/AMDGPU/AMDGPUCombinerHelper.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static bool fnegFoldsIntoMI(const MachineInstr &MI) {
4545
case AMDGPU::G_AMDGPU_FMAX_LEGACY:
4646
return true;
4747
case AMDGPU::G_INTRINSIC: {
48-
unsigned IntrinsicID = cast<GIntrinsic>(MI).getIntrinsicID();
48+
Intrinsic::ID IntrinsicID = cast<GIntrinsic>(MI).getIntrinsicID();
4949
switch (IntrinsicID) {
5050
case Intrinsic::amdgcn_rcp:
5151
case Intrinsic::amdgcn_rcp_legacy:
@@ -96,7 +96,7 @@ static bool hasSourceMods(const MachineInstr &MI) {
9696
return false;
9797
case AMDGPU::G_INTRINSIC:
9898
case AMDGPU::G_INTRINSIC_CONVERGENT: {
99-
unsigned IntrinsicID = cast<GIntrinsic>(MI).getIntrinsicID();
99+
Intrinsic::ID IntrinsicID = cast<GIntrinsic>(MI).getIntrinsicID();
100100
switch (IntrinsicID) {
101101
case Intrinsic::amdgcn_interp_p1:
102102
case Intrinsic::amdgcn_interp_p2:
@@ -239,7 +239,7 @@ bool AMDGPUCombinerHelper::matchFoldableFneg(MachineInstr &MI,
239239
return true;
240240
case AMDGPU::G_INTRINSIC:
241241
case AMDGPU::G_INTRINSIC_CONVERGENT: {
242-
unsigned IntrinsicID = cast<GIntrinsic>(MatchInfo)->getIntrinsicID();
242+
Intrinsic::ID IntrinsicID = cast<GIntrinsic>(MatchInfo)->getIntrinsicID();
243243
switch (IntrinsicID) {
244244
case Intrinsic::amdgcn_rcp:
245245
case Intrinsic::amdgcn_rcp_legacy:
@@ -341,7 +341,7 @@ void AMDGPUCombinerHelper::applyFoldableFneg(MachineInstr &MI,
341341
break;
342342
case AMDGPU::G_INTRINSIC:
343343
case AMDGPU::G_INTRINSIC_CONVERGENT: {
344-
unsigned IntrinsicID = cast<GIntrinsic>(MatchInfo)->getIntrinsicID();
344+
Intrinsic::ID IntrinsicID = cast<GIntrinsic>(MatchInfo)->getIntrinsicID();
345345
switch (IntrinsicID) {
346346
case Intrinsic::amdgcn_rcp:
347347
case Intrinsic::amdgcn_rcp_legacy:

llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace AMDGPU {
3737
/// These opcodes have an Intrinsic::ID operand similar to a GIntrinsic. But
3838
/// they are not actual instances of GIntrinsics, so we cannot use
3939
/// GIntrinsic::getIntrinsicID() on them.
40-
unsigned getIntrinsicID(const MachineInstr &I);
40+
Intrinsic::ID getIntrinsicID(const MachineInstr &I);
4141

4242
struct RsrcIntrinsic {
4343
unsigned Intr;

llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,7 @@ bool AMDGPUInstructionSelector::selectDivScale(MachineInstr &MI) const {
10141014
}
10151015

10161016
bool AMDGPUInstructionSelector::selectG_INTRINSIC(MachineInstr &I) const {
1017-
unsigned IntrinsicID = cast<GIntrinsic>(I).getIntrinsicID();
1017+
Intrinsic::ID IntrinsicID = cast<GIntrinsic>(I).getIntrinsicID();
10181018
switch (IntrinsicID) {
10191019
case Intrinsic::amdgcn_if_break: {
10201020
MachineBasicBlock *BB = I.getParent();
@@ -2096,7 +2096,7 @@ bool AMDGPUInstructionSelector::selectPOPSExitingWaveID(
20962096

20972097
bool AMDGPUInstructionSelector::selectG_INTRINSIC_W_SIDE_EFFECTS(
20982098
MachineInstr &I) const {
2099-
unsigned IntrinsicID = cast<GIntrinsic>(I).getIntrinsicID();
2099+
Intrinsic::ID IntrinsicID = cast<GIntrinsic>(I).getIntrinsicID();
21002100
switch (IntrinsicID) {
21012101
case Intrinsic::amdgcn_end_cf:
21022102
return selectEndCfIntrinsic(I);

0 commit comments

Comments
 (0)