================
@@ -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() ==
----------------
iamaayushrivastava wrote:
When I added the unsigned-handling for `lt/le/gt/ge`, I touched `eq`/`ne` too
for consistency calling `getSInt()` on a possibly-unsigned value felt
inconsistent with the new type-aware logic, even though the result is identical
either way. Not a correctness fix, just stylistic. Reverted back to `getSInt()`
as you suggested, since equality doesn't depend on signedness.
https://github.com/llvm/llvm-project/pull/202502
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits