[llvm-commits] [126126] Improve handling of aggregate inputs to asm, per Chris' suggestion

johannes at apple.com johannes at apple.com
Sat Apr 14 17:15:43 PDT 2007


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);





More information about the llvm-commits mailing list