http://llvm.org/bugs/show_bug.cgi?id=21184

            Bug ID: 21184
           Summary: x86 code generation miscompilation
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Created attachment 13158
  --> http://llvm.org/bugs/attachment.cgi?id=13158&action=edit
Program, that misbehaves under x86_64.

I have a input file, which is a small program, that prints out some data.
When running on x86_64, without optimizations it produces wrong output.

[karl@funbox bugpoint]$ clang -O0 write.ll -o test && ./test
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff 00 00 00 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff 1f 00 00 00

When using the interpreter it produces correct output.

[karl@funbox bugpoint]$ lli -force-interpreter write.ll 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff 0f 00 00 00 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff 1f 00 00 00 

When run on a arm, it also produces correct output.
So I believe that the problem lies in x86 code generation.

Note that bugpoint does manage to reduce somewhat, but I believe the original
code is a better starting point for tracking down this issue.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to