[all-commits] [llvm/llvm-project] ded35c: [vectorcombine] Pull sext/zext through reduce.or/a...

Philip Reames via All-commits all-commits at lists.llvm.org
Thu Jul 18 13:57:01 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ded35c0c3ad371287e80872d6bd104ce3f7d2864
      https://github.com/llvm/llvm-project/commit/ded35c0c3ad371287e80872d6bd104ce3f7d2864
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2024-07-18 (Thu, 18 Jul 2024)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/VectorCombine.cpp
    M llvm/test/Transforms/VectorCombine/RISCV/vecreduce-of-cast.ll

  Log Message:
  -----------
  [vectorcombine] Pull sext/zext through reduce.or/and/xor (#99548)

This extends the existing foldTruncFromReductions transform to handle
sext and zext as well. This is only legal for the bitwise reductions
(and/or/xor) and not the arithmetic ones (add, mul). Use the same
costing decision to drive whether we do the transform.



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