================
@@ -2715,18 +2715,22 @@ EmitAsmStores(CodeGenFunction &CGF, const AsmStmt &S,
   // ResultRegDests can be also populated by addReturnRegisterOutputs() above,
   // in which case its size may grow.
   assert(ResultTypeRequiresCast.size() <= ResultRegDests.size());
-  assert(ResultRegIsFlagReg.size() <= ResultRegDests.size());
+  assert(OutputOperandBounds.size() <= ResultRegDests.size());
 
   for (unsigned i = 0, e = RegResults.size(); i != e; ++i) {
     llvm::Value *Tmp = RegResults[i];
     llvm::Type *TruncTy = ResultTruncRegTypes[i];
 
-    if ((i < ResultRegIsFlagReg.size()) && ResultRegIsFlagReg[i]) {
+    if ((i < OutputOperandBounds.size()) && OutputOperandBounds[i]) {
       // Target must guarantee the Value `Tmp` here is lowered to a boolean
       // value.
-      llvm::Constant *Two = llvm::ConstantInt::get(Tmp->getType(), 2);
+      // Lowering 'Tmp' as - 'icmp ult %Tmp , CCUpperBound'.
+      unsigned UpperBound = OutputOperandBounds[i];
+      assert(UpperBound <= 4 && "Output operand out of range!");
----------------
uweigand wrote:

There is no point in restricting this to 4.   However, you should either 
actually implement the lower bounds check, or else assert here that the lower 
bound is zero.

https://github.com/llvm/llvm-project/pull/125970
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to