File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
llvm/test/Transforms/VectorCombine/RISCV Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change
1
+ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
2
+ ; RUN: opt < %s -S -p vector-combine -mtriple=riscv64 -mattr=+v | FileCheck %s
3
+
4
+ define <4 x i32 > @add_constant_load (ptr %p ) {
5
+ ; CHECK-LABEL: define <4 x i32> @add_constant_load(
6
+ ; CHECK-SAME: ptr [[P:%.*]]) #[[ATTR0:[0-9]+]] {
7
+ ; CHECK-NEXT: [[X:%.*]] = load i32, ptr [[P]], align 4
8
+ ; CHECK-NEXT: [[V_SCALAR:%.*]] = add i32 [[X]], 42
9
+ ; CHECK-NEXT: [[V:%.*]] = insertelement <4 x i32> poison, i32 [[V_SCALAR]], i64 0
10
+ ; CHECK-NEXT: ret <4 x i32> [[V]]
11
+ ;
12
+ %x = load i32 , ptr %p
13
+ %ins = insertelement <4 x i32 > poison, i32 %x , i32 0
14
+ %v = add <4 x i32 > %ins , splat (i32 42 )
15
+ ret <4 x i32 > %v
16
+ }
You can’t perform that action at this time.
0 commit comments