| ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py |
| ; RUN: opt < %s -slp-vectorizer -S -mtriple=x86_64-- | FileCheck %s |
| |
| define <4 x i8> @pr52275(<4 x i8> %v, i8* %x) { |
| ; CHECK-LABEL: @pr52275( |
| ; CHECK-NEXT: [[G1:%.*]] = getelementptr inbounds i8, i8* [[X:%.*]], i64 1 |
| ; CHECK-NEXT: [[TMP1:%.*]] = bitcast i8* [[X]] to <2 x i8>* |
| ; CHECK-NEXT: [[TMP2:%.*]] = load <2 x i8>, <2 x i8>* [[TMP1]], align 4 |
| ; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <2 x i8> [[TMP2]], <2 x i8> poison, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef> |
| ; CHECK-NEXT: [[V11:%.*]] = shufflevector <4 x i8> [[V:%.*]], <4 x i8> [[TMP3]], <4 x i32> <i32 4, i32 5, i32 2, i32 3> |
| ; CHECK-NEXT: [[V2:%.*]] = add <4 x i8> [[V11]], [[V11]] |
| ; CHECK-NEXT: ret <4 x i8> [[V2]] |
| ; |
| %x0 = load i8, i8* %x, align 4 |
| %g1 = getelementptr inbounds i8, i8* %x, i64 1 |
| %x1 = load i8, i8* %g1, align 4 |
| %v0 = insertelement <4 x i8> %v, i8 %x0, i64 0 |
| %v1 = insertelement <4 x i8> %v0, i8 %x1, i64 1 |
| %v2 = add <4 x i8> %v0, %v1 |
| ret <4 x i8> %v2 |
| } |