[clang] Fix cir vec cmp fold (PR #202502)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 9 14:55:46 PDT 2026


================
@@ -3475,8 +3501,8 @@ OpFoldResult cir::VecCmpOp::fold(FoldAdaptor adaptor) {
     }
     case cir::CmpOpKind::eq: {
       if (isIntAttr) {
-        cmpResult = mlir::cast<cir::IntAttr>(lhsAttr).getSInt() ==
-                    mlir::cast<cir::IntAttr>(rhsAttr).getSInt();
+        cmpResult = mlir::cast<cir::IntAttr>(lhsAttr).getValue() ==
----------------
andykaylor wrote:

This will work, but I'm curious why you decided to change this case.

https://github.com/llvm/llvm-project/pull/202502


More information about the cfe-commits mailing list