[all-commits] [llvm/llvm-project] 8e6db7: [RISCV] Fix a crash from trying to truncate an FP ...

Craig Topper via All-commits all-commits at lists.llvm.org
Wed Sep 27 12:21:23 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8e6db7e2b2b4c4cbd13a8f5177358118e12d40d4
      https://github.com/llvm/llvm-project/commit/8e6db7e2b2b4c4cbd13a8f5177358118e12d40d4
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2023-09-27 (Wed, 27 Sep 2023)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp-buildvec.ll

  Log Message:
  -----------
  [RISCV] Fix a crash from trying to truncate an FP type in lowerBuildV… (#67488)

…ectorOfConstants.

ComputeNumSignBits can return an answer for FP constants based on
bitcasting them to int.

Check for an integer type so we don't create an illegal truncate.

We could support this case with bitcasts, but I leave that to a separate
patch.




More information about the All-commits mailing list