[SelectionDAG] Simplify SelectionDAGBuilder::visitInlineAsm
authorFangrui Song <maskray@google.com>
Mon, 30 Dec 2019 05:53:34 +0000 (21:53 -0800)
committerFangrui Song <maskray@google.com>
Thu, 2 Jan 2020 17:44:23 +0000 (09:44 -0800)
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

index b78b8e9..ffc8c3c 100644 (file)
@@ -8181,7 +8181,6 @@ void SelectionDAGBuilder::visitInlineAsm(ImmutableCallSite CS) {
         AsmNodeOperands.push_back(DAG.getTargetConstant(OpFlags, getCurSDLoc(),
                                                         MVT::i32));
         AsmNodeOperands.push_back(OpInfo.CallOperand);
-        break;
       } else {
         // Otherwise, this outputs to a register (directly for C_Register /
         // C_RegisterClass, and a target-defined fashion for
@@ -8318,8 +8317,7 @@ void SelectionDAGBuilder::visitInlineAsm(ImmutableCallSite CS) {
       }
 
       assert((OpInfo.ConstraintType == TargetLowering::C_RegisterClass ||
-              OpInfo.ConstraintType == TargetLowering::C_Register ||
-              OpInfo.ConstraintType == TargetLowering::C_Immediate) &&
+              OpInfo.ConstraintType == TargetLowering::C_Register) &&
              "Unknown constraint type!");
 
       // TODO: Support this.