[all-commits] [llvm/llvm-project] b484fa: [X86] Fix crash with inline asm using wrong regist...

FabianWolff via All-commits all-commits at lists.llvm.org
Mon Nov 15 18:38:28 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b484fa8289299a4a55708d8e4104aacfea8d7fd5
      https://github.com/llvm/llvm-project/commit/b484fa8289299a4a55708d8e4104aacfea8d7fd5
  Author: Fabian Wolff <fabian.wolff at alumni.ethz.ch>
  Date:   2021-11-16 (Tue, 16 Nov 2021)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    A llvm/test/CodeGen/X86/asm-reject-reg-type-mismatch-avx.ll

  Log Message:
  -----------
  [X86] Fix crash with inline asm using wrong register name

Fixes PR#48678. `X86TargetLowering::getRegForInlineAsmConstraint()` can adjust the register class to match the type, e.g. change `VR128X` to `VR256X` if the type needs 256 bits. However, the function currently returns the unadjusted register and the adjusted register class, e.g. `xmm15` and `VR256X`, which then causes an assertion failure later because the register class does not contain that register. This patch fixes this behavior.

Reviewed By: pengfei

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




More information about the All-commits mailing list