File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1022,15 +1022,15 @@ bool PPCMIPeephole::simplifyCode(void) {
1022
1022
case PPC::TW: {
1023
1023
MachineInstr *LiMI1 = getVRegDefOrNull (&MI.getOperand (1 ), MRI);
1024
1024
MachineInstr *LiMI2 = getVRegDefOrNull (&MI.getOperand (2 ), MRI);
1025
- unsigned Opcode1 = LiMI1->getOpcode ();
1026
- unsigned Opcode2 = LiMI2->getOpcode ();
1027
1025
bool IsOperand2Immediate = MI.getOperand (2 ).isImm ();
1028
1026
// We can only do the optimization if we can get immediates
1029
1027
// from both operands
1030
- if (!(LiMI1 && (Opcode1 == PPC::LI || Opcode1 == PPC::LI8)))
1028
+ if (!(LiMI1 && (LiMI1->getOpcode () == PPC::LI ||
1029
+ LiMI1->getOpcode () == PPC::LI8)))
1031
1030
break ;
1032
1031
if (!IsOperand2Immediate &&
1033
- !(LiMI2 && (Opcode2 == PPC::LI || Opcode2 == PPC::LI8)))
1032
+ !(LiMI2 && (LiMI2->getOpcode () == PPC::LI ||
1033
+ LiMI2->getOpcode () == PPC::LI8)))
1034
1034
break ;
1035
1035
1036
1036
auto ImmOperand0 = MI.getOperand (0 ).getImm ();
You can’t perform that action at this time.
0 commit comments