Compiler projects using llvm
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -passes=instcombine -S | FileCheck %s

define i1 @f(i1 %cond, i32 %x, i32 %x2) {
; CHECK-LABEL: @f(
; CHECK-NEXT:    [[C:%.*]] = icmp eq i32 [[X:%.*]], [[X2:%.*]]
; CHECK-NEXT:    ret i1 [[C]]
;
  %y = select i1 %cond, i32 poison, i32 %x
  %c = icmp eq i32 %y, %x2
  ret i1 %c
}