[LLVMbugs] [Bug 1716] New: noalias attribute pessimization

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Sep 30 15:20:36 PDT 2007


           Summary: noalias attribute pessimization
           Product: libraries
           Version: trunk
          Platform: Macintosh
        OS/Version: Mac System 9.x
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core LLVM classes
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: sabre at nondot.org
                CC: llvmbugs at cs.uiuc.edu

The following simple code:

#include <stdio.h>
#include <stdlib.h>

int power(int X) {
  if (X == 0) return 1;
  return X*power(X-1);

int main(int argc, char **argv) {
  printf("%d\n", power(atoi(argv[0])));

Produces this LLVM code on linux:

        %tmp20 = tail call i32 (i8* noalias , ...)* bitcast (i32 (i8*, ...)*
@printf to i32 (i8* noalias , ...)*)( i8* getelementptr ([4 x i8]* @.str, i32
0, i32 0) noalias , i32 %accumulator.tr.lcssa.i )            ; <i32> [#uses=0]

The bitcasting needs to be resolved, which is there only because of the noalias


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