[LLVMbugs] [Bug 3694] New: missing instcombine for GEP 0, X, Y, Z of bitcast of Ty* to [ 0 x Ty]*
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sun Mar 1 08:24:37 PST 2009
http://llvm.org/bugs/show_bug.cgi?id=3694
Summary: missing instcombine for GEP 0,X,Y,Z of bitcast of Ty* to
[0 x Ty]*
Product: new-bugs
Version: unspecified
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: baldrick at free.fr
CC: llvmbugs at cs.uiuc.edu
test/FrontendC/2007-03-27-VarLengthArray.c now compiles to
define i32 @e(i32 %m, i32 %n) nounwind {
entry:
%0 = alloca i32, i32 %n, align 4 ; <i32*> [#uses=2]
%1 = bitcast i32* %0 to [0 x i32]* ; <[0 x i32]*>
[#uses=1]
call void @f(i32* %0) nounwind
%2 = getelementptr [0 x i32]* %1, i32 0, i32 %m ; <i32*>
[#uses=1]
%3 = load i32* %2, align 4 ; <i32> [#uses=1]
ret i32 %3
}
The bitcast could be eliminated by stripping the
first index off the GEP.
--
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