llvm/llvm/test/Transforms/InstCombine/pr33453.ll

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

@g1 = external global i16
@g2 = external global i16

define float @patatino() {
; CHECK-LABEL: @patatino(
; CHECK-NEXT:    [[CMP:%.*]] = icmp eq ptr getelementptr inbounds (i8, ptr @g2, i64 2), @g1
; CHECK-NEXT:    [[FMUL:%.*]] = uitofp i1 [[CMP]] to float
; CHECK-NEXT:    ret float [[FMUL]]
;
  %cmp = icmp eq ptr getelementptr inbounds (i16, ptr @g2, i64 1), @g1
  %uitofp1 = uitofp i1 %cmp to float
  %uitofp2 = uitofp i1 %cmp to float
  %fmul = fmul float %uitofp1, %uitofp2
  %call = call float @fabsf(float %fmul)
  ret float %call
}

declare float @fabsf(float)