[llvm] 04e94bb - [AArch64] Update Changed status in AArch64MIPeepholeOpt
David Green via llvm-commits
llvm-commits at lists.llvm.org
Thu May 11 11:55:49 PDT 2023
Author: David Green
Date: 2023-05-11T19:55:44+01:00
New Revision: 04e94bb12fe5c295d0c1b88bbcb49607a566136c
URL: https://github.com/llvm/llvm-project/commit/04e94bb12fe5c295d0c1b88bbcb49607a566136c
DIFF: https://github.com/llvm/llvm-project/commit/04e94bb12fe5c295d0c1b88bbcb49607a566136c.diff
LOG: [AArch64] Update Changed status in AArch64MIPeepholeOpt
I have not seen this be a problem, but the Changed status should be updated not
reset on new instruction to get the total Changed status overall.
Added:
Modified:
llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp b/llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp
index dff786d7bba8..1991b3416331 100644
--- a/llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp
+++ b/llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp
@@ -689,63 +689,63 @@ bool AArch64MIPeepholeOpt::runOnMachineFunction(MachineFunction &MF) {
default:
break;
case AArch64::INSERT_SUBREG:
- Changed = visitINSERT(MI);
+ Changed |= visitINSERT(MI);
break;
case AArch64::ANDWrr:
- Changed = visitAND<uint32_t>(AArch64::ANDWri, MI);
+ Changed |= visitAND<uint32_t>(AArch64::ANDWri, MI);
break;
case AArch64::ANDXrr:
- Changed = visitAND<uint64_t>(AArch64::ANDXri, MI);
+ Changed |= visitAND<uint64_t>(AArch64::ANDXri, MI);
break;
case AArch64::ORRWrs:
- Changed = visitORR(MI);
+ Changed |= visitORR(MI);
break;
case AArch64::ADDWrr:
- Changed = visitADDSUB<uint32_t>(AArch64::ADDWri, AArch64::SUBWri, MI);
+ Changed |= visitADDSUB<uint32_t>(AArch64::ADDWri, AArch64::SUBWri, MI);
break;
case AArch64::SUBWrr:
- Changed = visitADDSUB<uint32_t>(AArch64::SUBWri, AArch64::ADDWri, MI);
+ Changed |= visitADDSUB<uint32_t>(AArch64::SUBWri, AArch64::ADDWri, MI);
break;
case AArch64::ADDXrr:
- Changed = visitADDSUB<uint64_t>(AArch64::ADDXri, AArch64::SUBXri, MI);
+ Changed |= visitADDSUB<uint64_t>(AArch64::ADDXri, AArch64::SUBXri, MI);
break;
case AArch64::SUBXrr:
- Changed = visitADDSUB<uint64_t>(AArch64::SUBXri, AArch64::ADDXri, MI);
+ Changed |= visitADDSUB<uint64_t>(AArch64::SUBXri, AArch64::ADDXri, MI);
break;
case AArch64::ADDSWrr:
- Changed = visitADDSSUBS<uint32_t>({AArch64::ADDWri, AArch64::ADDSWri},
- {AArch64::SUBWri, AArch64::SUBSWri},
- MI);
+ Changed |=
+ visitADDSSUBS<uint32_t>({AArch64::ADDWri, AArch64::ADDSWri},
+ {AArch64::SUBWri, AArch64::SUBSWri}, MI);
break;
case AArch64::SUBSWrr:
- Changed = visitADDSSUBS<uint32_t>({AArch64::SUBWri, AArch64::SUBSWri},
- {AArch64::ADDWri, AArch64::ADDSWri},
- MI);
+ Changed |=
+ visitADDSSUBS<uint32_t>({AArch64::SUBWri, AArch64::SUBSWri},
+ {AArch64::ADDWri, AArch64::ADDSWri}, MI);
break;
case AArch64::ADDSXrr:
- Changed = visitADDSSUBS<uint64_t>({AArch64::ADDXri, AArch64::ADDSXri},
- {AArch64::SUBXri, AArch64::SUBSXri},
- MI);
+ Changed |=
+ visitADDSSUBS<uint64_t>({AArch64::ADDXri, AArch64::ADDSXri},
+ {AArch64::SUBXri, AArch64::SUBSXri}, MI);
break;
case AArch64::SUBSXrr:
- Changed = visitADDSSUBS<uint64_t>({AArch64::SUBXri, AArch64::SUBSXri},
- {AArch64::ADDXri, AArch64::ADDSXri},
- MI);
+ Changed |=
+ visitADDSSUBS<uint64_t>({AArch64::SUBXri, AArch64::SUBSXri},
+ {AArch64::ADDXri, AArch64::ADDSXri}, MI);
break;
case AArch64::INSvi64gpr:
- Changed = visitINSviGPR(MI, AArch64::INSvi64lane);
+ Changed |= visitINSviGPR(MI, AArch64::INSvi64lane);
break;
case AArch64::INSvi32gpr:
- Changed = visitINSviGPR(MI, AArch64::INSvi32lane);
+ Changed |= visitINSviGPR(MI, AArch64::INSvi32lane);
break;
case AArch64::INSvi16gpr:
- Changed = visitINSviGPR(MI, AArch64::INSvi16lane);
+ Changed |= visitINSviGPR(MI, AArch64::INSvi16lane);
break;
case AArch64::INSvi8gpr:
- Changed = visitINSviGPR(MI, AArch64::INSvi8lane);
+ Changed |= visitINSviGPR(MI, AArch64::INSvi8lane);
break;
case AArch64::INSvi64lane:
- Changed = visitINSvi64lane(MI);
+ Changed |= visitINSvi64lane(MI);
break;
}
}
More information about the llvm-commits
mailing list