[all-commits] [llvm/llvm-project] 40e965: [RISCV] Use tail agnostic policy when selecting ri...

Craig Topper via All-commits all-commits at lists.llvm.org
Thu May 12 09:10:04 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 40e965451151dadc46c3f41249edf4651015fda4
      https://github.com/llvm/llvm-project/commit/40e965451151dadc46c3f41249edf4651015fda4
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2022-05-12 (Thu, 12 May 2022)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vfma-vp.ll
    M llvm/test/CodeGen/RISCV/rvv/sink-splat-operands.ll
    M llvm/test/CodeGen/RISCV/rvv/vfma-vp.ll

  Log Message:
  -----------
  [RISCV] Use tail agnostic policy when selecting riscv_fma_vl to instructions

riscv_fma_vl doesn't have a tail, so use the tail_agnostic policy.

We were already doing this for some patterns. I think the patterns
with fneg and mask were added later and I copied the tail policy
from the unmasked patterns.

Reviewed By: khchen

Differential Revision: https://reviews.llvm.org/D125424


  Commit: cec249c60dad84574fd53d2fbf158bfeef226777
      https://github.com/llvm/llvm-project/commit/cec249c60dad84574fd53d2fbf158bfeef226777
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2022-05-12 (Thu, 12 May 2022)

  Changed paths:
    M llvm/lib/CodeGen/TypePromotion.cpp
    M llvm/test/CodeGen/AArch64/typepromotion-phisret.ll
    M llvm/test/Transforms/TypePromotion/AArch64/trunc-zext-chain.ll
    M llvm/test/Transforms/TypePromotion/ARM/phis-ret.ll

  Log Message:
  -----------
  [TypePromotion] Promote undef by converting to 0.

If we're promoting an undef I think that means that we expect the
upper bits are zero. undef doesn't guarantee that.

This patch replaces undef with 0 to ensure this. This matches how
a zext or sext of undef would be folded by InstCombine/InstSimplify.

I haven't found a failure from this was just thinking through the code.

Differential Revision: https://reviews.llvm.org/D123174


Compare: https://github.com/llvm/llvm-project/compare/0f292141aadb...cec249c60dad


More information about the All-commits mailing list