Skip to content

InstCombineCalls.cpp:786: llvm::Instruction* moveAddAfterMinMax(llvm::IntrinsicInst*, llvm::InstCombiner::BuilderTy&): Assertion `!Overflow && "Expected simplify of min/max"' failed. #52884

@regehr

Description

@regehr

https://gcc.godbolt.org/z/z7c3xx86Y

opt -instcombine crashes on this IR:


define i8 @smax_offset(i8 %x) {
  %1 = add nuw nsw i8 50, %x
  %m = call i8 @llvm.smax.i8(i8 %1, i8 -124)
  ret i8 %m
}

this was found by my student @Hatsunespica

Metadata

Metadata

Assignees

No one assigned

    Labels

    compile-failUse [accepts-invalid] and [rejects-valid] insteadllvm:codegen

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions