Fix buildbot after 9f31446c
authorJessica Paquette <jpaquette@apple.com>
Tue, 28 Apr 2020 22:19:17 +0000 (15:19 -0700)
committerJessica Paquette <jpaquette@apple.com>
Tue, 28 Apr 2020 22:19:17 +0000 (15:19 -0700)
Add missing ifndef to make release builds happy.

Example failure: http://lab.llvm.org:8011/builders/fuchsia-x86_64-linux/builds/4006/steps/ninja-build/logs/stdio

llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp

index e29c97f..d7334f6 100644 (file)
@@ -768,8 +768,11 @@ static bool selectCopy(MachineInstr &I, const TargetInstrInfo &TII,
             (!Register::isPhysicalRegister(I.getOperand(0).getReg()) &&
              !Register::isPhysicalRegister(I.getOperand(1).getReg()))) &&
            "No phys reg on generic operator!");
-    bool ValidCopy = KnownValid || isValidCopy(I, DstRegBank, MRI, TRI, RBI);
+    bool ValidCopy = true;
+#ifndef NDEBUG
+    ValidCopy = KnownValid || isValidCopy(I, DstRegBank, MRI, TRI, RBI);
     assert(ValidCopy && "Invalid copy.");
+#endif
     return ValidCopy;
   };