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

             Bug #: 11290
           Summary: Alignment of loads over conservative in
                    CodeGenFunction::EmitCall.
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: LLVM Codegen
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified


The alignment of the load instruction created in line CGCall.cpp:1701 is always
set to 1 in line 1704.

01700         for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) {
01701           llvm::Value *EltPtr = Builder.CreateConstGEP2_32(SrcPtr, 0, i);
01702           llvm::LoadInst *LI = Builder.CreateLoad(EltPtr);
01703           // We don't know what we're loading from.
01704           LI->setAlignment(1);

The alignment is overconservative and can be made stricter since the alignment
of the underlying object and the sizes of its fields are known here.

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