================ @@ -2621,9 +2621,18 @@ EmitAsmStores(CodeGenFunction &CGF, const AsmStmt &S, 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); + // Lowering 'Tmp' as - 'icmp ult %Tmp , CCUpperBound'. On some targets + // CCUpperBound is not binary. CCUpperBound is 4 for SystemZ, + // interval [0, 4). With this range known, llvm.assume intrinsic guides + // optimizer to generate more optimized IR in most of the cases as + // observed for select_cc on SystemZ unit tests for flag output operands. + // For some cases for br_cc, generated IR was weird. e.g. switch table + // for simple simple comparison terms for br_cc. ---------------- uweigand wrote:
You don't need to explain that wrong code will result from an incorrect assertion. https://github.com/llvm/llvm-project/pull/125970 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits