[LLVMbugs] [Bug 6314] New: llc -O0 -regalloc=local and yacr2 test failing
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Mon Feb 15 15:42:42 PST 2010
http://llvm.org/bugs/show_bug.cgi?id=6314
Summary: llc -O0 -regalloc=local and yacr2 test failing
Product: new-bugs
Version: trunk
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: ddunkle at arxan.com
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=4235)
--> (http://llvm.org/bugs/attachment.cgi?id=4235)
the Output.yacr2.link file (input to llc).
We are running the MultiSource/Benchmarks/Ptrdist/yacr2/yacr2 test and it
generates different output than native gcc at runtime, meaning to us that the
test fails. The failing test is compiled to bitcode, then compiled using llc
-O0 -regalloc=local (for the PowerPC 32 bit target). When we compiled with llc
with the default options (e.g. -O2 and the linearscan register allocator) the
test generates the same output as the native gcc version of yacr2, meaning the
test passes.
So it fails this way:
0) compile using llvm-gcc to bitcode
1) llvm-link Output/assign.bc Output/channel.bc Output/hcg.bc Output/main.bc
Output/maze.bc Output/option.bc Output/vcg.bc -f -o Output.yacr2.link
2) llc -O0 -regalloc=local -f Output.yacr2.link -o yacr2.link.s
3) gcc yacr2.link.s -o yacr2.link_p -lm -m32 -arch ppc -isysroot
/Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.3 -deadstrip -framework
Carbon -framework Cocoa -framework Security
and it passes this way:
0) compile using llvm-gcc to bitcode
1) llvm-link Output/assign.bc Output/channel.bc Output/hcg.bc Output/main.bc
Output/maze.bc Output/option.bc Output/vcg.bc -f -o Output.yacr2.link
2) llc -f Output.yacr2.link -o yacr2.link.s
3) gcc yacr2.link.s -o yacr2.link_p -lm -m32 -arch ppc -isysroot
/Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.3 -deadstrip -framework
Carbon -framework Cocoa -framework Security
The only difference is in step 2) where the llc is done.
To be clear, failure means differences in yacr2 output versus the results
produced by a yacr2 compiled directly to native code. This is, we build the
native test this way:
a) <path>/llvm-2.6-src/projects/test-suite/RunSafely.sh 500 0 /dev/null
yacr2.out-link_p ./yacr2.link_p <path>/llvm-2.6-
src/projects/testsuite/MultiSource/Benchmarks/Ptrdist/yacr2/input2.in
then diff the two output files:
b) diff yacr2.out-link_p Output/yacr2.out-nat
and see differences between the native gcc compiled version and the bitcode
version compiled with llc and "-O0 -regalloc=local". The yacr2.out-nat file
resulted from a similar run of the yacr2 compiled this way with gcc:
gcc -DTODD
-I<path>/llvm-2.6-test/projects/test-suite/MultiSource/Benchmarks/Ptrdist/yacr2
-I<path>/llvm-2.6-src/projects/test-suite/MultiSource/Benchmarks/Ptrdist/yacr2
-I<path>/llvm-2.6-test/include
-I<path>/llvm-2.6-src/projects/test-suite/include -I../../../../include
-I<path>/llvm-2.6-src/include -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -DNDEBUG
-O2 -m32 -arch ppc -isysroot /Developer/SDKs/MacOSX10.5.sdk
-mmacosx-version-min=10.3 -fno-omit-frame-pointer -fno-strict-aliasing -fPIC -c
... etc. etc. ...
g++ -o Output/yacr2.native Output/assign.o Output/channel.o Output/hcg.o
Output/main.o Output/maze.o Output/option.o Output/vcg.o -O2 -m32 -arch ppc
-isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.3
-fno-omit-frame-pointer -fno-strict-aliasing -fPIC
We tried use bugpoint in miscompilation/incorrect code generation mode and were
unable to figure out the arguments to bugpoint. Therefore, we are attaching the
result of the llvm-link (the Output.yacr2.link file from above).
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list