AArch64FastISel: Abort if we failed to select operand of intrinsic
authorMatthias Braun <matze@braunis.de>
Fri, 21 Sep 2018 15:47:41 +0000 (15:47 +0000)
committerMatthias Braun <matze@braunis.de>
Fri, 21 Sep 2018 15:47:41 +0000 (15:47 +0000)
rdar://44642447

Differential Revision: https://reviews.llvm.org/D52335

llvm-svn: 342742

llvm/lib/Target/AArch64/AArch64FastISel.cpp

index af82eda..e9e68ac 100644 (file)
@@ -3742,6 +3742,9 @@ bool AArch64FastISel::fastLowerIntrinsicCall(const IntrinsicInst *II) {
               TII.get(TargetOpcode::COPY), ResultReg1).addReg(MulReg);
     }
 
+    if (!ResultReg1)
+      return false;
+
     ResultReg2 = fastEmitInst_rri(AArch64::CSINCWr, &AArch64::GPR32RegClass,
                                   AArch64::WZR, /*IsKill=*/true, AArch64::WZR,
                                   /*IsKill=*/true, getInvertedCondCode(CC));