[llvm-bugs] [Bug 36454] New: IRBuilder:: CreateMaxNum calls min when it should call max

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Feb 20 05:52:00 PST 2018


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

            Bug ID: 36454
           Summary: IRBuilder:: CreateMaxNum calls min when it should call
                    max
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Core LLVM classes
          Assignee: unassignedbugs at nondot.org
          Reporter: cesare at loftsoft.co.uk
                CC: llvm-bugs at lists.llvm.org

There looks to be a problem in llvm/IR/IRBuilder.h with the implementation of
CreateMaxNum, trunk currently looks like:

  /// Create call to the maxnum intrinsic.
  CallInst *CreateMaxNum(Value *LHS, Value *RHS, const Twine &Name = "") {
    return CreateBinaryIntrinsic(Intrinsic::minnum, LHS, RHS, Name);
  }

I'm guessing this is a copy/paste error from CreateMinNum and it should be
calling Intrinsic::maxnum?

-- 
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/20180220/4ab24bd7/attachment.html>


More information about the llvm-bugs mailing list