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

Aayush Shrivastava via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 10 03:06:28 PDT 2026


================
@@ -225,3 +225,46 @@ module  {
   // CHECK-SAME: #cir.int<0> : !s32i, #cir.int<0> : !s32i]> : !cir.vector<4 x !s32i>
   // CHECK-NEXT: cir.return %[[RES]] : !cir.vector<4 x !s32i>
 }
+
----------------
iamaayushrivastava wrote:

Added `fold_cmp_vector_op_test_i1_result`, which folds a `vec.cmp` to a `!cir.vector<4 x !cir.int<s, 1>>` result and confirms the output is `#cir.int<-1> : !cir.int<s, 1>` for true elements.

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


More information about the cfe-commits mailing list