[llvm-bugs] [Bug 43501] New: invalid bitcast->gep inbounds

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Sep 29 10:01:19 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=43501

            Bug ID: 43501
           Summary: invalid bitcast->gep inbounds
           Product: libraries
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: nunoplopes at sapo.pt
                CC: llvm-bugs at lists.llvm.org, regehr at cs.utah.edu,
                    spatel+llvm at rotateright.com

See below the invalid transformation of a bitcast to a gep inbounds. The input
to the bitcast is a function argument, which could be out-of-bounds.

llvm/test/Transforms/InstCombine/cast.ll

define [4 x float]* @test27([9 x [4 x float]]* %A) {
; CHECK-NEXT: [[C:%.*]] = getelementptr inbounds [9 x [4 x float]], [9 x [4 x
float]]* [[A:%.*]], i64 0, i64 0

  %c = bitcast [9 x [4 x float]]* %A to [4 x float]*
  ret [4 x float]* %c
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190929/c55f794e/attachment.html>


More information about the llvm-bugs mailing list