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

           Summary: r112211 breaks ABI on Darwin (clang emits invalid
                    function call)
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: LLVM Codegen
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


Created an attachment (id=5428)
 --> (http://llvm.org/bugs/attachment.cgi?id=5428)
Assembly before and after the change.

After r112211, clang start to emit invalid function call and so, programs
crashes when calling system library like veclib.

For instance, the simple following code crashes badly in vU128Divide() when
executed:

-----------------------------------

#include <vecLib/vBigNum.h>
#include <vecLib/vBasicOps.h>

int main(int argc, char **argv) {
  vU128 remain;
  vU128 ten = { .s = {.MSW = 0, .d2 = 0, .d3 = 0, .LSW = 10} };
  vU128 bigint = { .s = {.MSW = 0, .d2 = 0, .d3 = 30038, .LSW = 2857641354} };  
  bigint.v = vU128Divide(bigint.v, ten.v, &remain.v);
  return bigint.s.MSW;
}

-----------------------------------

I attached generated llvm assembly before and after this change.

Note that simply reverting this change on trunk fixes the issue.

-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to