67 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s -S -mtriple=aarch64 -passes=slp-vectorizer | FileCheck %s3 4%struct.buf = type { [8 x i8] }5 6define i8 @reduce_and(ptr %a, ptr %b) {7; CHECK-LABEL: @reduce_and(8; CHECK-NEXT: entry:9; CHECK-NEXT: [[TMP1:%.*]] = load <8 x i8>, ptr [[A:%.*]], align 110; CHECK-NEXT: [[TMP3:%.*]] = load <8 x i8>, ptr [[B:%.*]], align 111; CHECK-NEXT: [[TMP4:%.*]] = xor <8 x i8> [[TMP3]], [[TMP1]]12; CHECK-NEXT: [[TMP5:%.*]] = call i8 @llvm.vector.reduce.and.v8i8(<8 x i8> [[TMP4]])13; CHECK-NEXT: [[OP_RDX:%.*]] = and i8 [[TMP5]], 114; CHECK-NEXT: ret i8 [[OP_RDX]]15;16entry:17 %0 = load i8, ptr %a, align 118 %1 = load i8, ptr %b, align 119 %xor12 = xor i8 %1, %020 %and13 = and i8 %xor12, 121 %arrayidx.1 = getelementptr inbounds %struct.buf, ptr %a, i64 0, i32 0, i64 122 %2 = load i8, ptr %arrayidx.1, align 123 %arrayidx3.1 = getelementptr inbounds %struct.buf, ptr %b, i64 0, i32 0, i64 124 %3 = load i8, ptr %arrayidx3.1, align 125 %xor12.1 = xor i8 %3, %226 %and13.1 = and i8 %xor12.1, %and1327 %arrayidx.2 = getelementptr inbounds %struct.buf, ptr %a, i64 0, i32 0, i64 228 %4 = load i8, ptr %arrayidx.2, align 129 %arrayidx3.2 = getelementptr inbounds %struct.buf, ptr %b, i64 0, i32 0, i64 230 %5 = load i8, ptr %arrayidx3.2, align 131 %xor12.2 = xor i8 %5, %432 %and13.2 = and i8 %xor12.2, %and13.133 %arrayidx.3 = getelementptr inbounds %struct.buf, ptr %a, i64 0, i32 0, i64 334 %6 = load i8, ptr %arrayidx.3, align 135 %arrayidx3.3 = getelementptr inbounds %struct.buf, ptr %b, i64 0, i32 0, i64 336 %7 = load i8, ptr %arrayidx3.3, align 137 %xor12.3 = xor i8 %7, %638 %and13.3 = and i8 %xor12.3, %and13.239 %arrayidx.4 = getelementptr inbounds %struct.buf, ptr %a, i64 0, i32 0, i64 440 %8 = load i8, ptr %arrayidx.4, align 141 %arrayidx3.4 = getelementptr inbounds %struct.buf, ptr %b, i64 0, i32 0, i64 442 %9 = load i8, ptr %arrayidx3.4, align 143 %xor12.4 = xor i8 %9, %844 %and13.4 = and i8 %xor12.4, %and13.345 %arrayidx.5 = getelementptr inbounds %struct.buf, ptr %a, i64 0, i32 0, i64 546 %10 = load i8, ptr %arrayidx.5, align 147 %arrayidx3.5 = getelementptr inbounds %struct.buf, ptr %b, i64 0, i32 0, i64 548 %11 = load i8, ptr %arrayidx3.5, align 149 %xor12.5 = xor i8 %11, %1050 %and13.5 = and i8 %xor12.5, %and13.451 %arrayidx.6 = getelementptr inbounds %struct.buf, ptr %a, i64 0, i32 0, i64 652 %12 = load i8, ptr %arrayidx.6, align 153 %arrayidx3.6 = getelementptr inbounds %struct.buf, ptr %b, i64 0, i32 0, i64 654 %13 = load i8, ptr %arrayidx3.6, align 155 %xor12.6 = xor i8 %13, %1256 %and13.6 = and i8 %xor12.6, %and13.557 %arrayidx.7 = getelementptr inbounds %struct.buf, ptr %a, i64 0, i32 0, i64 758 %14 = load i8, ptr %arrayidx.7, align 159 %arrayidx3.7 = getelementptr inbounds %struct.buf, ptr %b, i64 0, i32 0, i64 760 %15 = load i8, ptr %arrayidx3.7, align 161 %xor12.7 = xor i8 %15, %1462 %and13.7 = and i8 %xor12.7, %and13.663 ret i8 %and13.764}65 66 67