blob: 329e4d2debcf655090cf0b8df92d8164c0c60244 [file]
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
; RUN: opt -passes=slp-vectorizer -S -slp-threshold=-100 -mtriple=arm64-apple-macosx15.0.0 < %s | FileCheck %s
define i1 @test(i32 %shr.i.i90, i32 %x) {
; CHECK-LABEL: define i1 @test(
; CHECK-SAME: i32 [[SHR_I_I90:%.*]], i32 [[X:%.*]]) {
; CHECK-NEXT: [[ENTRY:.*:]]
; CHECK-NEXT: [[TMP0:%.*]] = insertelement <2 x i32> poison, i32 [[X]], i32 0
; CHECK-NEXT: [[TMP6:%.*]] = insertelement <2 x i32> [[TMP0]], i32 [[SHR_I_I90]], i32 1
; CHECK-NEXT: [[TMP1:%.*]] = sub <2 x i32> [[TMP6]], <i32 2, i32 0>
; CHECK-NEXT: [[TMP2:%.*]] = call <2 x i32> @llvm.abs.v2i32(<2 x i32> [[TMP1]], i1 true)
; CHECK-NEXT: [[TMP4:%.*]] = icmp ugt <2 x i32> [[TMP2]], <i32 100, i32 300>
; CHECK-NEXT: [[TMP5:%.*]] = extractelement <2 x i1> [[TMP4]], i32 0
; CHECK-NEXT: ret i1 [[TMP5]]
;
entry:
%cond.i.i = tail call i32 @llvm.abs.i32(i32 %shr.i.i90, i1 true)
%conv.i.i91 = zext i32 %cond.i.i to i64
%sub32.i.i = sub i32 %x, 2
%cond41.i.i = tail call i32 @llvm.abs.i32(i32 %sub32.i.i, i1 true)
%conv42.i.i = zext i32 %cond41.i.i to i64
%cmp.not.i.2.i.i = icmp ugt i64 %conv.i.i91, 300
%cmp.not.i.3.i.i = icmp ugt i64 %conv42.i.i, 100
ret i1 %cmp.not.i.3.i.i
}
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #0