[ARM] Fix Changed status in MVEGatherScatterLoweringPass.
authorDavid Green <david.green@arm.com>
Thu, 10 Jun 2021 20:53:04 +0000 (21:53 +0100)
committerDavid Green <david.green@arm.com>
Thu, 10 Jun 2021 20:53:04 +0000 (21:53 +0100)
Now that we are calling SimplifyInstructionsInBlock, make sure we update
Changed when it reports alterations.

llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp

index 6188480..4c1d0ba 100644 (file)
@@ -1167,7 +1167,7 @@ bool MVEGatherScatterLowering::runOnFunction(Function &F) {
   bool Changed = false;
 
   for (BasicBlock &BB : F) {
-    SimplifyInstructionsInBlock(&BB);
+    Changed |= SimplifyInstructionsInBlock(&BB);
 
     for (Instruction &I : BB) {
       IntrinsicInst *II = dyn_cast<IntrinsicInst>(&I);