[llvm-bugs] [Bug 37892] New: Assertion failed: IndexReg.getReg() != X86::ESP && IndexReg.getReg() != X86::RSP && "Cannot use ESP as index reg!"
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jun 21 06:17:38 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=37892
Bug ID: 37892
Summary: Assertion failed: IndexReg.getReg() != X86::ESP &&
IndexReg.getReg() != X86::RSP && "Cannot use ESP as
index reg!"
Product: new-bugs
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: greg.bedwell at sony.com
CC: llvm-bugs at lists.llvm.org
Found with a tool we've been using to randomly permute x86 assembly for
llvm-mca testing. In this case the assembly it's generated is invalid but the
compiler is asserting rather than erroring.
$ clang.exe --version
clang version 7.0.0 (trunk 335220) (llvm/trunk 335219)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: e:\work\upstream-llvm\build-vs2015-native-ninja\bin
$ cat 1.s
leaq (%rax,%rsp), %rax
$ gcc -c 1.s
1.s: Assembler messages:
1.s:1: Error: `(%rax,%rsp)' is not a valid base/index expression
$ clang.exe -c 1.s
Assertion failed: IndexReg.getReg() != X86::ESP && IndexReg.getReg() !=
X86::RSP && "Cannot use ESP as index reg!", file
E:\work\upstream-llvm\llvm\lib\Target\X86\MCTargetDesc\X86MCCodeEmitter.cpp,
line 561
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180621/23bd5359/attachment.html>
More information about the llvm-bugs
mailing list