[PATCH] D155087: [CodeGen] Fix assertion failure caused by inline assembly
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 14 08:41:20 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/test/CodeGen/X86/inline-asm-assertion.ll:3
+; RUN: not llc -O0 < %s 2>&1 | FileCheck %s
+; CHECK: error: inline assembly requires more registers than available
+
----------------
bryanpkc wrote:
> Suggestions:
>
> 1. Add a `CHECK` line to match the output assembly, e.g. `; CHECK: .size main, .Lfunc_end0-main`, to ensure that that the backend does not crash after register allocation.
> 1. Add a `RUN` line with `llc -O2` to ensure that `RegAllocGreedy` behaves the same way.
>
Could also add -verify-machineinstrs, it may fail already with expensive checks. I was working on fixing verifier errors after regalloc failure but haven't finished it
================
Comment at: llvm/test/CodeGen/X86/inline-asm-assertion.ll:60
+
+attributes #0 = { noinline nounwind optnone uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
+attributes #1 = { nounwind readnone }
----------------
Can probably drop most of these attributes
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155087/new/
https://reviews.llvm.org/D155087
More information about the llvm-commits
mailing list