[PATCH] D22054: [SystemZ] Fix regression when handling conditional calls

Marcin Koƛcielnicki via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 6 11:18:41 PDT 2016


koriakin added a comment.

Thanks for fixing this! Looks OK, but ISTM the whole thing could be avoided by just doing addOperand instead of the more specific variants?


================
Comment at: lib/Target/SystemZ/SystemZInstrInfo.cpp:626
@@ -625,6 +625,3 @@
     MI.setDesc(get(SystemZ::CallBRCL));
-    MachineInstrBuilder(*MI.getParent()->getParent(), MI)
-      .addImm(CCValid).addImm(CCMask)
-      .addGlobalAddress(Global)
-      .addRegMask(RegMask)
-      .addReg(SystemZ::CC, RegState::Implicit);
+    MachineInstrBuilder MIB = MachineInstrBuilder(*MI.getParent()->getParent(),
+                                                  MI);
----------------
nit: MachineInstrBuilder MIB(*MI.getParent()->getParent(), MI); would be shorter

================
Comment at: lib/Target/SystemZ/SystemZInstrInfo.cpp:631
@@ +630,3 @@
+
+    if (FirstOp.isGlobal())
+      MIB.addGlobalAddress(FirstOp.getGlobal());
----------------
Shouldn't it be enough to just addOperand(FirstOp)?


http://reviews.llvm.org/D22054





More information about the llvm-commits mailing list