File tree Expand file tree Collapse file tree 2 files changed +56
-0
lines changed
llvm/test/CodeGen/LoongArch Expand file tree Collapse file tree 2 files changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2
+ ; RUN: llc --mtriple=loongarch64 --mattr=+lasx < %s | FileCheck %s
3
+
4
+ define <8 x float > @insert_bitcast_v8f32 (<8 x float > %a , i32 %b ) nounwind {
5
+ ; CHECK-LABEL: insert_bitcast_v8f32:
6
+ ; CHECK: # %bb.0: # %entry
7
+ ; CHECK-NEXT: movgr2fr.w $fa1, $a0
8
+ ; CHECK-NEXT: movfr2gr.s $a0, $fa1
9
+ ; CHECK-NEXT: xvinsgr2vr.w $xr0, $a0, 1
10
+ ; CHECK-NEXT: ret
11
+ entry:
12
+ %c = bitcast i32 %b to float
13
+ %d = insertelement <8 x float > %a , float %c , i32 1
14
+ ret <8 x float > %d
15
+ }
16
+
17
+ define <4 x double > @insert_bitcast_v4f64 (<4 x double > %a , i64 %b ) nounwind {
18
+ ; CHECK-LABEL: insert_bitcast_v4f64:
19
+ ; CHECK: # %bb.0: # %entry
20
+ ; CHECK-NEXT: movgr2fr.d $fa1, $a0
21
+ ; CHECK-NEXT: movfr2gr.d $a0, $fa1
22
+ ; CHECK-NEXT: xvinsgr2vr.d $xr0, $a0, 1
23
+ ; CHECK-NEXT: ret
24
+ entry:
25
+ %c = bitcast i64 %b to double
26
+ %d = insertelement <4 x double > %a , double %c , i32 1
27
+ ret <4 x double > %d
28
+ }
Original file line number Diff line number Diff line change
1
+ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2
+ ; RUN: llc --mtriple=loongarch64 --mattr=+lsx < %s | FileCheck %s
3
+
4
+ define <4 x float > @insert_bitcast_v4f32 (<4 x float > %a , i32 %b ) nounwind {
5
+ ; CHECK-LABEL: insert_bitcast_v4f32:
6
+ ; CHECK: # %bb.0: # %entry
7
+ ; CHECK-NEXT: movgr2fr.w $fa1, $a0
8
+ ; CHECK-NEXT: movfr2gr.s $a0, $fa1
9
+ ; CHECK-NEXT: vinsgr2vr.w $vr0, $a0, 1
10
+ ; CHECK-NEXT: ret
11
+ entry:
12
+ %c = bitcast i32 %b to float
13
+ %d = insertelement <4 x float > %a , float %c , i32 1
14
+ ret <4 x float > %d
15
+ }
16
+
17
+ define <2 x double > @insert_bitcast_v2f64 (<2 x double > %a , i64 %b ) nounwind {
18
+ ; CHECK-LABEL: insert_bitcast_v2f64:
19
+ ; CHECK: # %bb.0: # %entry
20
+ ; CHECK-NEXT: movgr2fr.d $fa1, $a0
21
+ ; CHECK-NEXT: movfr2gr.d $a0, $fa1
22
+ ; CHECK-NEXT: vinsgr2vr.d $vr0, $a0, 1
23
+ ; CHECK-NEXT: ret
24
+ entry:
25
+ %c = bitcast i64 %b to double
26
+ %d = insertelement <2 x double > %a , double %c , i32 1
27
+ ret <2 x double > %d
28
+ }
You can’t perform that action at this time.
0 commit comments