GBuella added inline comments.
================ Comment at: lib/CodeGen/CGBuiltin.cpp:10107-10112 + case 0x0b: // FALSE_OQ + case 0x1b: // FALSE_OS + return llvm::Constant::getNullValue(ConvertType(E->getType())); + case 0x0f: // TRUE_UQ + case 0x1f: // TRUE_US + return llvm::Constant::getAllOnesValue(ConvertType(E->getType())); ---------------- spatel wrote: > On 2nd thought, why are we optimizing when we have matching IR predicates for > these? > Just translate to FCMP_TRUE / FCMP_FALSE instead of special-casing these > values. > InstSimplify can handle the constant folding if optimization is on. I don't know, these TRUE/FALSE cases were already handled here, I only rearranged the code. Does this cause any problems? I mean, if it meant an extra dozen lines of code I would get it, but as it is, does it hurt anything? https://reviews.llvm.org/D45616 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits