[llvm-bugs] [Bug 32987] New: [inline asm] dot operator while using imm generates wrong ir + asm
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed May 10 06:29:01 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=32987
Bug ID: 32987
Summary: [inline asm] dot operator while using imm generates
wrong ir + asm
Product: new-bugs
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: ziv.izhar at intel.com
CC: llvm-bugs at lists.llvm.org
When using both imm and dot operator in an inline asm operand the generated ir
and asm are wrong.
Consider the code:
typedef struct foo {
int x;
int y;
} foo;
int main(){
__asm {mov eax, 3[rbx]foo.y}
return 0;
}
compiling with clang -cc1 -fasm-blocks -emit-llvm gives us:
call i32 asm sideeffect inteldialect "mov eax, $$3[ebx].11",
"={eax},~{eax},~{dirflag},~{fpsr},~{flags}"
the foo.y was rewrited as .11 (8+3 instead of 8) while the immediate is still
in the ir - $$3.
when compiling to asm, it's being resolved as 11+3 = 14, instead of 8+3=11.
--
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/20170510/f6fa5790/attachment-0001.html>
More information about the llvm-bugs
mailing list