[all-commits] [llvm/llvm-project] e9c9f8: [WebAssembly] Fold any/alltrue (setcc x, 0, eq/ne)...

jjasmine via All-commits all-commits at lists.llvm.org
Tue Jul 1 15:27:59 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e9c9f8f3748a1666dfd099da7990ebe4523778bf
      https://github.com/llvm/llvm-project/commit/e9c9f8f3748a1666dfd099da7990ebe4523778bf
  Author: jjasmine <jjasmine at igalia.com>
  Date:   2025-07-01 (Tue, 01 Jul 2025)

  Changed paths:
    M llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
    A llvm/test/CodeGen/WebAssembly/simd-setcc-reductions.ll
    M llvm/test/CodeGen/WebAssembly/simd-vecreduce-bool.ll

  Log Message:
  -----------
  [WebAssembly] Fold any/alltrue (setcc x, 0, eq/ne) to [not] any/alltrue x (#144741)

Fixes https://github.com/llvm/llvm-project/issues/50142, a miss of
further vectorization, where we can only achieve zext (xor (any_true),
-1).

Now in test case simd-setcc-reductions, it's converted to all_true.

Also fixes https://github.com/llvm/llvm-project/issues/145177, which is

all_true (setcc x, 0, eq) -> not any_true
any_true (setcc x, 0, ne) -> any_true
all_true (setcc x, 0, ne) -> all_true

---------

Co-authored-by: badumbatish <--show-origin>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list