; NOTE: Assertions have been autogenerated by utils/update_test_checks.py ; RUN: opt < %s -instcombine -S | FileCheck %s ; Fold ; x s/EXACT (1 << y) ; to ; x a>>EXACT y ; iff 1< @t3_vec_splat(<2 x i8> %x) { ; CHECK-LABEL: @t3_vec_splat( ; CHECK-NEXT: [[DIV:%.*]] = ashr exact <2 x i8> [[X:%.*]], ; CHECK-NEXT: ret <2 x i8> [[DIV]] ; %div = sdiv exact <2 x i8> %x, ret <2 x i8> %div } define <2 x i8> @t4_vec(<2 x i8> %x) { ; CHECK-LABEL: @t4_vec( ; CHECK-NEXT: [[DIV:%.*]] = ashr exact <2 x i8> [[X:%.*]], ; CHECK-NEXT: ret <2 x i8> [[DIV]] ; %div = sdiv exact <2 x i8> %x, ret <2 x i8> %div } define <2 x i8> @n5_vec_undef(<2 x i8> %x) { ; CHECK-LABEL: @n5_vec_undef( ; CHECK-NEXT: ret <2 x i8> poison ; %div = sdiv exact <2 x i8> %x, ret <2 x i8> %div } define <2 x i8> @n6_vec_negative(<2 x i8> %x) { ; CHECK-LABEL: @n6_vec_negative( ; CHECK-NEXT: [[DIV:%.*]] = sdiv exact <2 x i8> [[X:%.*]], ; CHECK-NEXT: ret <2 x i8> [[DIV]] ; %div = sdiv exact <2 x i8> %x, ; non-non-negative divisor ret <2 x i8> %div }