[clang] [CIR] Avoid folding non-integer constants as integer casts (PR #214551)
Kunal Dubey via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 6 18:12:01 PDT 2026
================
@@ -1013,10 +1013,15 @@ OpFoldResult cir::CastOp::fold(FoldAdaptor adaptor) {
auto srcIntTy = mlir::cast<cir::IntType>(srcTy);
auto dstIntTy = mlir::cast<cir::IntType>(getType());
+ auto constIntAttr = srcConst.getValueAttr<cir::IntAttr>();
----------------
xakep8 wrote:
I've added the UndefAttr propogation similar to the Poison propogation PTAL.
https://github.com/llvm/llvm-project/pull/214551
More information about the cfe-commits
mailing list