brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 290de96 Raw
33 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 22; RUN: opt -passes=instcombine -S < %s | FileCheck %s3 4define <vscale x 4 x i32> @load(ptr %x) {5; CHECK-LABEL: define <vscale x 4 x i32> @load6; CHECK-SAME: (ptr [[X:%.*]]) {7; CHECK-NEXT:    [[TMP1:%.*]] = call i64 @llvm.vscale.i64()8; CHECK-NEXT:    [[TMP2:%.*]] = shl nuw i64 [[TMP1]], 49; CHECK-NEXT:    [[A_ELT1:%.*]] = getelementptr inbounds i8, ptr [[X]], i64 [[TMP2]]10; CHECK-NEXT:    [[A_UNPACK2:%.*]] = load <vscale x 4 x i32>, ptr [[A_ELT1]], align 1611; CHECK-NEXT:    ret <vscale x 4 x i32> [[A_UNPACK2]]12;13  %a = load [2 x <vscale x 4 x i32>], ptr %x14  %b = extractvalue [2 x <vscale x 4 x i32>] %a, 115  ret <vscale x 4 x i32> %b16}17 18define void @store(ptr %x, <vscale x 4 x i32> %y, <vscale x 4 x i32> %z) {19; CHECK-LABEL: define void @store20; CHECK-SAME: (ptr [[X:%.*]], <vscale x 4 x i32> [[Y:%.*]], <vscale x 4 x i32> [[Z:%.*]]) {21; CHECK-NEXT:    store <vscale x 4 x i32> [[Y]], ptr [[X]], align 1622; CHECK-NEXT:    [[TMP1:%.*]] = call i64 @llvm.vscale.i64()23; CHECK-NEXT:    [[TMP2:%.*]] = shl nuw i64 [[TMP1]], 424; CHECK-NEXT:    [[X_REPACK1:%.*]] = getelementptr inbounds i8, ptr [[X]], i64 [[TMP2]]25; CHECK-NEXT:    store <vscale x 4 x i32> [[Z]], ptr [[X_REPACK1]], align 1626; CHECK-NEXT:    ret void27;28  %a = insertvalue [2 x <vscale x 4 x i32>] poison, <vscale x 4 x i32> %y, 029  %b = insertvalue [2 x <vscale x 4 x i32>] %a, <vscale x 4 x i32> %z, 130  store [2 x <vscale x 4 x i32>] %b, ptr %x31  ret void32}33