llvm-project/llvm/test/Transforms/InstCombine/signed-comparison.ll

15 lines
370 B
LLVM
Raw Normal View History

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -instcombine -S | FileCheck %s
; Convert the zext+slt into a simple ult.
define i1 @foo(i16 %t4) {
; CHECK-LABEL: @foo(
; CHECK-NEXT: [[T6:%.*]] = icmp ult i16 %t4, 500
; CHECK-NEXT: ret i1 [[T6]]
;
%t5 = zext i16 %t4 to i32
%t6 = icmp slt i32 %t5, 500
ret i1 %t6
}