[all-commits] [llvm/llvm-project] 2d57de: (reland) [GlobalISel] Diagnose inline assembly con...

Pierre van Houtryve via All-commits all-commits at lists.llvm.org
Thu May 8 01:36:25 PDT 2025


  Branch: refs/heads/users/pierre-vh/reland-diag-inlineasm
  Home:   https://github.com/llvm/llvm-project
  Commit: 2d57dec58c2d7e30c93856f61870abcbf73ef784
      https://github.com/llvm/llvm-project/commit/2d57dec58c2d7e30c93856f61870abcbf73ef784
  Author: pvanhout <pierre.vanhoutryve at amd.com>
  Date:   2025-05-08 (Thu, 08 May 2025)

  Changed paths:
    M llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp
    M llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
    A llvm/test/CodeGen/AMDGPU/GlobalISel/inline-asm-lowering-diags.ll

  Log Message:
  -----------
  (reland) [GlobalISel] Diagnose inline assembly constraint lowering errors (#135782)

The initial patch caused issues because it emits an error, and llc is sensitive to it.
It also caused compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp to fail.

Use warnings instead + reject lowering. That way, the fallback path is used without llc/clang returning a failure code.
If fallback isn't enabled then the warnings provide context as to why lowering failed.

Original commit description:
---
Instead of printing something to dbgs (which is not visible to all users),
emit a diagnostic like the DAG does. We still crash later because we fail to
select the inline assembly, but at least now users will know why it's crashing.

In a future patch we could also recover from the error like the DAG does, so the
lowering can keep going until it either crashes or gives a different error later.



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