| ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4 |
| ; RUN: opt < %s -passes=vector-combine -S -mtriple=x86_64-- | FileCheck %s |
| |
| define i32 @test(ptr %a0) { |
| ; CHECK-LABEL: define i32 @test( |
| ; CHECK-SAME: ptr [[A0:%.*]]) { |
| ; CHECK-NEXT: [[LOAD:%.*]] = load <16 x i8>, ptr [[A0]], align 1 |
| ; CHECK-NEXT: [[SHUF:%.*]] = shufflevector <16 x i8> [[LOAD]], <16 x i8> poison, <4 x i32> <i32 0, i32 poison, i32 poison, i32 poison> |
| ; CHECK-NEXT: [[ELT:%.*]] = extractelement <16 x i8> [[LOAD]], i64 11 |
| ; CHECK-NEXT: [[INS:%.*]] = insertelement <4 x i8> [[SHUF]], i8 [[ELT]], i64 1 |
| ; CHECK-NEXT: [[RES:%.*]] = bitcast <4 x i8> [[INS]] to i32 |
| ; CHECK-NEXT: ret i32 [[RES]] |
| ; |
| %load = load <16 x i8>, ptr %a0, align 1 |
| %shuf = shufflevector <16 x i8> %load, <16 x i8> poison, <4 x i32> <i32 0, i32 poison, i32 poison, i32 poison> |
| %elt = extractelement <16 x i8> %load, i64 11 |
| %ins = insertelement <4 x i8> %shuf, i8 %elt, i64 1 |
| %res = bitcast <4 x i8> %ins to i32 |
| ret i32 %res |
| } |