[llvm-bugs] [Bug 34021] New: MS Inline assembly with vector type causes a bad trunc emission.
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Aug 1 08:10:49 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=34021
Bug ID: 34021
Summary: MS Inline assembly with vector type causes a bad trunc
emission.
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
Assignee: unassignedclangbugs at nondot.org
Reporter: erich.keane at intel.com
CC: llvm-bugs at lists.llvm.org, rnk at google.com
Code:
typedef int v4si __attribute__ ((vector_size (16)));
v4si rep() {
v4si res;
__asm {}
return res;
}
Compile with: -O0 -fms-extensions -m32
Result is a crash in DAG due to a trunc that widens instead of narrows.
Higher optimizer levels cause this to disappear, presumably due to instcombine.
Our original repro:
#include <emmintrin.h>
__m128i x;
__m128i foo ()
{
__asm {
movdqu xmm0, xmm1
}
return x;
}
Also should validate that the following works:
#include <emmintrin.h>
__m128i x;
__m128i foo ()
{
__asm {
movdqu xmm0, x
}
}
int main () {
foo();
return 0;
}
--
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/20170801/56138554/attachment.html>
More information about the llvm-bugs
mailing list