I've attached the .ll file that aborts when run. It's something to do with the inline assembly thingy. On the plus side, GMP compiled! :-)
Created attachment 801 [details] .ll Version of the Program
Created attachment 802 [details] .c Version of the Program that Aborts
Reduced testcase: long long test(int A, int B, int C) { unsigned X, Y; __asm__ ("subf%I3c %1,%4,%3\nsubfze %0,%2" : "=r" (X), "=&r" (Y) : "r" (A), "rI" (B), "r" (C)); return ((long long)Y << 32) | X; } We compile this to: _test: # InlineAsm Start subfc r3,r5,r4 subfze r4,r3 # InlineAsm End stw r3, -4(r1) blr Note that the first instruction clobbers r3 before the second instruction uses it. -Chris
Fixed. Patch here: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070430/048747.html There are several other required patches to go along with this though. Testcase here: CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll -Chris