[all-commits] [llvm/llvm-project] 0a3521: [RISCV] Don't allow vector types to be used with i...

Craig Topper via All-commits all-commits at lists.llvm.org
Thu Dec 23 18:46:57 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0a35211b34886423199734698116b09debc74a71
      https://github.com/llvm/llvm-project/commit/0a35211b34886423199734698116b09debc74a71
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2021-12-23 (Thu, 23 Dec 2021)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/test/CodeGen/RISCV/inline-asm-invalid.ll

  Log Message:
  -----------
  [RISCV] Don't allow vector types to be used with inline asm 'r' constraint

The 'r' constraint uses the GPR class. There is generic support
for bitcasting and extending/truncating non-integer VTs to the
required integer VT. This doesn't work for scalable vectors and
instead crashes.

To prevent this, explicitly reject vectors. Fixed vectors might
work without crashing, but it doesn't seem worthwhile to allow.

While there remove an unnecessary level of indentation in the
"vr" and "vm" constraint handling.

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




More information about the All-commits mailing list