Revision: 126126
Author:   johannes
Date:     2007-04-14 17:15:43 -0700 (Sat, 14 Apr 2007)

Log Message:
-----------
Improve handling of aggregate inputs to asm, per Chris' suggestion

Modified Paths:
--------------
    apple-local/branches/llvm/gcc/llvm-convert.cpp

Modified: apple-local/branches/llvm/gcc/llvm-convert.cpp
===================================================================
--- apple-local/branches/llvm/gcc/llvm-convert.cpp      2007-04-15 00:14:13 UTC 
(rev 126125)
+++ apple-local/branches/llvm/gcc/llvm-convert.cpp      2007-04-15 00:15:43 UTC 
(rev 126126)
@@ -3720,11 +3720,10 @@
       if (!LLVMTy->isFirstClassType()) {
         // Structs and unions are permitted here, as long as they're the
         // same size as a register.
-        Value *Target = CreateTemporary(LLVMTy);          
         LValue LV = EmitLV(Val);
-        EmitAggregateCopy(Target, LV.Ptr, type, false, TREE_THIS_VOLATILE 
(Val));
+        assert(!LV.isBitfield());
         LLVMTy = IntegerType::get(TD.getTypeSizeInBits(LLVMTy));
-        Op = new LoadInst(CastToType(Instruction::BitCast, Target,
+        Op = new LoadInst(CastToType(Instruction::BitCast, LV.Ptr,
                           PointerType::get(LLVMTy)), "tmp", CurBB);
       } else {
         Op = Emit(Val, 0);


_______________________________________________
llvm-commits mailing list
[EMAIL PROTECTED]
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to