[llvm] [RISCV] Fold vmnot.m of an integer compare into the compare (PR #222553)
Marton Moro via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 10 04:09:58 PDT 2026
================
@@ -0,0 +1,66 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -mtriple=riscv32 -mattr=+v -verify-machineinstrs < %s | FileCheck %s
+; RUN: llc -mtriple=riscv64 -mattr=+v -verify-machineinstrs < %s | FileCheck %s
+
+define i1 @reduce_and_trunc_v8i8(ptr %p) {
+; CHECK-LABEL: reduce_and_trunc_v8i8:
+; CHECK: # %bb.0:
+; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
+; CHECK-NEXT: vle8.v v8, (a0)
+; CHECK-NEXT: vand.vi v8, v8, 1
+; CHECK-NEXT: vmseq.vi v8, v8, 0
+; CHECK-NEXT: vcpop.m a0, v8
+; CHECK-NEXT: seqz a0, a0
+; CHECK-NEXT: ret
+ %v = load <8 x i8>, ptr %p
----------------
martonmoro wrote:
Nope, not needed, I copied the repro from the issue. I'll switch the tests to take the vector as an argument.
https://github.com/llvm/llvm-project/pull/222553
More information about the llvm-commits
mailing list