[LLVMbugs] [Bug 11290] New: Alignment of loads over conservative in CodeGenFunction::EmitCall.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Nov 1 18:31:27 PDT 2011


             Bug #: 11290
           Summary: Alignment of loads over conservative in
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: ahatanak at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    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.

More information about the llvm-bugs mailing list