[llvm-bugs] [Bug 28957] constant function parameter is set to existing value

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Oct 10 12:29:10 PDT 2016


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

Sanjay Patel <spatel+llvm at rotateright.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |james.molloy at arm.com
         Resolution|---                         |FIXED

--- Comment #3 from Sanjay Patel <spatel+llvm at rotateright.com> ---
Thanks, Zvi! This is now optimized differently in IR:

define i32 @foo(i32 %x) local_unnamed_addr #0 {
entry:
  %cmp = icmp eq i32 %x, 1
  %.sink = select i1 %cmp, i32 1, i32 -1
  %call1 = tail call i32 @bar(i32 %.sink) #2
  ret i32 %call1
}

declare i32 @bar(i32) local_unnamed_addr #1
-------------------------------------------------------------------------

This is likely due to one of James Molloy's (cc'ing) improvements to
SimplifyCFG. https://reviews.llvm.org/D22143 ?

Resolving as fixed.

-- 
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/20161010/da9874d5/attachment.html>


More information about the llvm-bugs mailing list