[llvm-bugs] [Bug 50943] New: Inline asm miscompile (test segfaults)

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jun 30 08:51:15 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=50943

            Bug ID: 50943
           Summary: Inline asm miscompile (test segfaults)
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: paul_robinson at playstation.sony.com
                CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
                    llvm-dev at redking.me.uk, pengfei.wang at intel.com,
                    spatel+llvm at rotateright.com

Reduced from gdb test case gdb.arch/i386-avx.c

$ cat t1.c
typedef struct {
  float f[8];
} v8sf_t;
v8sf_t data[] =
  {
    { {  0.0,  0.125,  0.25,  0.375,  0.50,  0.625,  0.75,  0.875 } },
  };
int main (int argc, char **argv) {
      asm ("vmovaps 0(%0), %%ymm0\n\t"
           : /* no output operands */
           : "r" (data) 
           : "xmm0");
      return 0;
}
$ gcc t1.c -o t1-gcc
$ ./t1-gcc
$ clang t1.c -o t1-clang
$ ./t1-clang
Segementation fault
$

using gcc 7.5.0 and clang 13 1f169a77

-- 
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/20210630/57b17df2/attachment.html>


More information about the llvm-bugs mailing list