[llvm-bugs] [Bug 38677] New: isSignedMinMaxClamp - isa<SelectInst>(Select) && "Input should be a SelectInst!"

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Aug 23 03:20:05 PDT 2018


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

            Bug ID: 38677
           Summary: isSignedMinMaxClamp - isa<SelectInst>(Select) &&
                    "Input should be a SelectInst!"
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: llvm-dev at redking.me.uk
                CC: craig.topper at gmail.com, efriedma at codeaurora.org,
                    llvm-bugs at lists.llvm.org, spatel+llvm at rotateright.com

isSignedMinMaxClamp is asserting in the following case, reduced from
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10023

; ModuleID = 'bugpoint-reduced-simplified.bc'
source_filename = "llvm/test/Transforms/InstCombine/phi-select-constant.ll"
target triple = "x86_64-unknown-linux-gnu"

@A = extern_weak global i32, align 4
@B = extern_weak global i32, align 4

define i32 @foo(i1 %which) {
entry:
  br i1 true, label %final, label %delay

delay:                                            ; preds = %entry
  br label %final

final:                                            ; preds = %delay, %entry
  %use2 = phi i1 [ false, %entry ], [ icmp eq (i32* @A, i32* @B), %delay ]
  %value = select i1 %use2, i32 2, i32 1
  %B7 = mul i32 %value, 2147483647
  %C3 = icmp ule i32 %B7, 0
  store i1 %C3, i1* undef
  ret i32 %value
}

-- 
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/20180823/1fddc23c/attachment.html>


More information about the llvm-bugs mailing list