[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)
Ulrich Weigand via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 29 05:03:40 PDT 2025
================
@@ -2715,18 +2716,20 @@ 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]) {
- // Target must guarantee the Value `Tmp` here is lowered to a boolean
- // value.
- llvm::Constant *Two = llvm::ConstantInt::get(Tmp->getType(), 2);
+ if ((i < OutputOperandBounds.size()) &&
+ OutputOperandBounds[i].has_value()) {
+ const auto [LowerBound, UpperBound] = OutputOperandBounds[i].value();
+ assert(LowerBound == 0 && "Output operand lower bound is not zero.");
----------------
uweigand wrote:
There should be another comment here, along the lines of
```
// FIXME: Support for nonzero lower bounds not yet implemented.
```
https://github.com/llvm/llvm-project/pull/125970
More information about the cfe-commits
mailing list