[LLVMbugs] [Bug 1600] New: "parameterized intrinsics" don't work for mod/ref info

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Aug 5 01:06:40 PDT 2007


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

           Summary: "parameterized intrinsics" don't work for mod/ref info
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            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


We used to know that things like cttz don't have side effect info, but we lost
it along the way.  Here's a contrived example where " -load-vn -gcse
-instcombine " should produce a "ret 0":

declare i16 @llvm.cttz.i16(i16)

define i32 @test(i32* %P, i16* %Q) {
        %A = load i16* %Q               ; <i16> [#uses=1]
        %x = load i32* %P               ; <i32> [#uses=1]
        %B = call i16 @llvm.cttz.i16( i16 %A )          ; <i16> [#uses=1]
        %y = load i32* %P               ; <i32> [#uses=1]
        store i16 %B, i16* %Q
        %z = sub i32 %x, %y             ; <i32> [#uses=1]
        ret i32 %z
}

The problem is the code generated by GET_MODREF_BEHAVIOR in Intrinsics.gen. 
The function name produced is "llvm.cttz" with no suffix.

It would be better to change this code to use the IntrinsicID instead of the
name of the function.

-Chris


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