1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -mtriple=x86_64-unknown -passes=slp-vectorizer -S -mcpu=x86-64 | FileCheck %s
3 ; RUN: opt < %s -mtriple=x86_64-unknown -passes=slp-vectorizer -S -mcpu=x86-64-v2 | FileCheck %s
4 ; RUN: opt < %s -mtriple=x86_64-unknown -passes=slp-vectorizer -S -mcpu=x86-64-v3 | FileCheck %s
5 ; RUN: opt < %s -mtriple=x86_64-unknown -passes=slp-vectorizer -S -mcpu=x86-64-v4 | FileCheck %s
7 define void @PR62969(ptr dereferenceable(16) %out, ptr dereferenceable(16) %in) {
8 ; CHECK-LABEL: @PR62969(
9 ; CHECK-NEXT: [[IN0:%.*]] = getelementptr inbounds [2 x i64], ptr [[IN:%.*]], i64 0, i64 0
10 ; CHECK-NEXT: [[OUT0:%.*]] = getelementptr inbounds [2 x i64], ptr [[OUT:%.*]], i64 0, i64 0
11 ; CHECK-NEXT: [[TMP1:%.*]] = load <2 x i64>, ptr [[IN0]], align 8
12 ; CHECK-NEXT: [[TMP2:%.*]] = and <2 x i64> [[TMP1]], splat (i64 4294967295)
13 ; CHECK-NEXT: [[TMP3:%.*]] = lshr <2 x i64> [[TMP1]], splat (i64 32)
14 ; CHECK-NEXT: [[TMP4:%.*]] = mul <2 x i64> [[TMP2]], [[TMP3]]
15 ; CHECK-NEXT: store <2 x i64> [[TMP4]], ptr [[OUT0]], align 8
16 ; CHECK-NEXT: ret void
18 %in0 = getelementptr inbounds [2 x i64], ptr %in, i64 0, i64 0
19 %in1 = getelementptr inbounds [2 x i64], ptr %in, i64 0, i64 1
20 %x = load i64, ptr %in0, align 8
21 %y = load i64, ptr %in1, align 8
22 %xl = and i64 %x, 4294967295
23 %yl = and i64 %y, 4294967295
26 %m0 = mul i64 %xl, %xh
27 %m1 = mul i64 %yl, %yh
28 %out0 = getelementptr inbounds [2 x i64], ptr %out, i64 0, i64 0
29 %out1 = getelementptr inbounds [2 x i64], ptr %out, i64 0, i64 1
30 store i64 %m0, ptr %out0, align 8
31 store i64 %m1, ptr %out1, align 8