1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -instsimplify -S | FileCheck %s
4 define <2 x i1> @test1(<2 x i1> %a) {
6 ; CHECK-NEXT: ret <2 x i1> zeroinitializer
8 %b = and <2 x i1> %a, <i1 true, i1 false>
9 %res = mul <2 x i1> %b, <i1 false, i1 true>
13 define i32 @mul_by_1(i32 %A) {
14 ; CHECK-LABEL: @mul_by_1(
15 ; CHECK-NEXT: ret i32 [[A:%.*]]
21 define i32 @mul_by_0(i32 %A) {
22 ; CHECK-LABEL: @mul_by_0(
23 ; CHECK-NEXT: ret i32 0
29 define <16 x i8> @mul_by_0_vec(<16 x i8> %a) {
30 ; CHECK-LABEL: @mul_by_0_vec(
31 ; CHECK-NEXT: ret <16 x i8> zeroinitializer
33 %b = mul <16 x i8> %a, zeroinitializer
37 define <2 x i8> @mul_by_0_vec_undef_elt(<2 x i8> %a) {
38 ; CHECK-LABEL: @mul_by_0_vec_undef_elt(
39 ; CHECK-NEXT: ret <2 x i8> zeroinitializer
41 %b = mul <2 x i8> %a, <i8 undef, i8 0>