Skip to content

Commit fbf99ce

Browse files
committed
precommit
1 parent ad66b5a commit fbf99ce

File tree

1 file changed

+144
-0
lines changed

1 file changed

+144
-0
lines changed
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 3
2+
# RUN: llc %s -o - -mtriple=riscv64 -mattr=+v -run-pass=riscv-vector-peephole \
3+
# RUN: | FileCheck %s
4+
5+
--- |
6+
source_filename = "reduced.ll"
7+
target datalayout = "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128"
8+
target triple = "riscv64-unknown-linux-gnu"
9+
10+
define i32 @main() #0 {
11+
entry:
12+
%0 = tail call <vscale x 1 x i32> @llvm.riscv.vmv.v.v.nxv1i32.i64(<vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer, i64 0)
13+
%1 = tail call <vscale x 1 x i32> @llvm.riscv.vxor.mask.nxv1i32.nxv1i32.i64(<vscale x 1 x i32> %0, <vscale x 1 x i32> zeroinitializer, <vscale x 1 x i32> zeroinitializer, <vscale x 1 x i1> zeroinitializer, i64 0, i64 0)
14+
%2 = tail call <vscale x 1 x i64> @llvm.riscv.vwmacc.mask.nxv1i64.nxv1i32.nxv1i32.i64(<vscale x 1 x i64> zeroinitializer, <vscale x 1 x i32> %1, <vscale x 1 x i32> zeroinitializer, <vscale x 1 x i1> zeroinitializer, i64 0, i64 0)
15+
%3 = tail call target("riscv.vector.tuple", <vscale x 8 x i8>, 3) @llvm.riscv.tuple.insert.triscv.vector.tuple_nxv8i8_3t.nxv1i64(target("riscv.vector.tuple", <vscale x 8 x i8>, 3) zeroinitializer, <vscale x 1 x i64> %2, i32 0)
16+
call void @llvm.riscv.vsseg3.triscv.vector.tuple_nxv8i8_3t.i64(target("riscv.vector.tuple", <vscale x 8 x i8>, 3) %3, ptr null, i64 0, i64 6)
17+
ret i32 0
18+
}
19+
20+
declare <vscale x 1 x i32> @llvm.riscv.vmv.v.v.nxv1i32.i64(<vscale x 1 x i32>, <vscale x 1 x i32>, i64) #1
21+
22+
declare <vscale x 1 x i32> @llvm.riscv.vxor.mask.nxv1i32.nxv1i32.i64(<vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i1>, i64, i64 immarg) #1
23+
24+
declare <vscale x 1 x i64> @llvm.riscv.vwmacc.mask.nxv1i64.nxv1i32.nxv1i32.i64(<vscale x 1 x i64>, <vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i1>, i64, i64 immarg) #1
25+
26+
declare target("riscv.vector.tuple", <vscale x 8 x i8>, 3) @llvm.riscv.tuple.insert.triscv.vector.tuple_nxv8i8_3t.nxv1i64(target("riscv.vector.tuple", <vscale x 8 x i8>, 3), <vscale x 1 x i64>, i32 immarg) #2
27+
28+
declare void @llvm.riscv.vsseg3.triscv.vector.tuple_nxv8i8_3t.i64(target("riscv.vector.tuple", <vscale x 8 x i8>, 3), ptr captures(none), i64, i64 immarg) #3
29+
30+
attributes #0 = { "target-features"="+v" }
31+
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(none) "target-features"="+v" }
32+
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) "target-features"="+v" }
33+
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: write) "target-features"="+v" }
34+
35+
...
36+
---
37+
name: main
38+
alignment: 4
39+
exposesReturnsTwice: false
40+
legalized: false
41+
regBankSelected: false
42+
selected: false
43+
failedISel: false
44+
tracksRegLiveness: true
45+
hasWinCFI: false
46+
noPhis: false
47+
isSSA: true
48+
noVRegs: false
49+
hasFakeUses: false
50+
callsEHReturn: false
51+
callsUnwindInit: false
52+
hasEHScopes: false
53+
hasEHFunclets: false
54+
isOutlined: false
55+
debugInstrRef: false
56+
failsVerification: false
57+
tracksDebugUserValues: false
58+
registers:
59+
- { id: 0, class: vr, preferred-register: '', flags: [ ] }
60+
- { id: 1, class: vrnov0, preferred-register: '', flags: [ ] }
61+
- { id: 2, class: vr, preferred-register: '', flags: [ ] }
62+
- { id: 3, class: vrnov0, preferred-register: '', flags: [ ] }
63+
- { id: 4, class: vmv0, preferred-register: '', flags: [ ] }
64+
- { id: 5, class: vrnov0, preferred-register: '', flags: [ ] }
65+
- { id: 6, class: vrnov0, preferred-register: '', flags: [ ] }
66+
- { id: 7, class: vmv0, preferred-register: '', flags: [ ] }
67+
- { id: 8, class: vr, preferred-register: '', flags: [ ] }
68+
- { id: 9, class: vrn3m1, preferred-register: '', flags: [ ] }
69+
- { id: 10, class: vrn3m1, preferred-register: '', flags: [ ] }
70+
- { id: 11, class: vrn3m1, preferred-register: '', flags: [ ] }
71+
- { id: 12, class: vrn3m1, preferred-register: '', flags: [ ] }
72+
- { id: 13, class: vrn3m1, preferred-register: '', flags: [ ] }
73+
- { id: 14, class: gpr, preferred-register: '', flags: [ ] }
74+
liveins: []
75+
frameInfo:
76+
isFrameAddressTaken: false
77+
isReturnAddressTaken: false
78+
hasStackMap: false
79+
hasPatchPoint: false
80+
stackSize: 0
81+
offsetAdjustment: 0
82+
maxAlignment: 1
83+
adjustsStack: false
84+
hasCalls: false
85+
stackProtector: ''
86+
functionContext: ''
87+
maxCallFrameSize: 4294967295
88+
cvBytesOfCalleeSavedRegisters: 0
89+
hasOpaqueSPAdjustment: false
90+
hasVAStart: false
91+
hasMustTailInVarArgFunc: false
92+
hasTailCall: false
93+
isCalleeSavedInfoValid: false
94+
localFrameSize: 0
95+
savePoint: ''
96+
restorePoint: ''
97+
fixedStack: []
98+
stack: []
99+
entry_values: []
100+
callSites: []
101+
debugValueSubstitutions: []
102+
constants: []
103+
machineFunctionInfo:
104+
varArgsFrameIndex: 0
105+
varArgsSaveSize: 0
106+
body: |
107+
bb.0.entry:
108+
; CHECK-LABEL: name: main
109+
; CHECK: [[PseudoVMV_V_I_MF2_:%[0-9]+]]:vr = PseudoVMV_V_I_MF2 $noreg, 0, -1, 5 /* e32 */, 0 /* tu, mu */
110+
; CHECK-NEXT: [[PseudoVMCLR_M_B64_:%[0-9]+]]:vr = PseudoVMCLR_M_B64 -1, 0 /* e8 */
111+
; CHECK-NEXT: [[COPY:%[0-9]+]]:vmv0 = COPY [[PseudoVMCLR_M_B64_]]
112+
; CHECK-NEXT: [[PseudoVXOR_VV_MF2_MASK:%[0-9]+]]:vrnov0 = PseudoVXOR_VV_MF2_MASK [[PseudoVMV_V_I_MF2_]], [[PseudoVMV_V_I_MF2_]], [[PseudoVMV_V_I_MF2_]], [[COPY]], 0, 5 /* e32 */, 0 /* tu, mu */
113+
; CHECK-NEXT: [[PseudoVMV_V_I_M1_:%[0-9]+]]:vrnov0 = PseudoVMV_V_I_M1 $noreg, 0, -1, 6 /* e64 */, 0 /* tu, mu */
114+
; CHECK-NEXT: [[COPY1:%[0-9]+]]:vmv0 = COPY [[PseudoVMCLR_M_B64_]]
115+
; CHECK-NEXT: early-clobber %6:vrnov0 = PseudoVWMACC_VV_MF2_MASK [[PseudoVMV_V_I_M1_]], killed [[PseudoVXOR_VV_MF2_MASK]], [[PseudoVMV_V_I_MF2_]], [[COPY1]], 0, 5 /* e32 */, 0 /* tu, mu */
116+
; CHECK-NEXT: [[PseudoVMV_V_I_M1_1:%[0-9]+]]:vr = PseudoVMV_V_I_M1 $noreg, 0, -1, 3 /* e8 */, 0 /* tu, mu */
117+
; CHECK-NEXT: [[DEF:%[0-9]+]]:vrn3m1 = IMPLICIT_DEF
118+
; CHECK-NEXT: [[INSERT_SUBREG:%[0-9]+]]:vrn3m1 = INSERT_SUBREG [[DEF]], [[PseudoVMV_V_I_M1_1]], %subreg.sub_vrm1_0
119+
; CHECK-NEXT: [[INSERT_SUBREG1:%[0-9]+]]:vrn3m1 = INSERT_SUBREG [[INSERT_SUBREG]], [[PseudoVMV_V_I_M1_1]], %subreg.sub_vrm1_1
120+
; CHECK-NEXT: [[INSERT_SUBREG2:%[0-9]+]]:vrn3m1 = INSERT_SUBREG [[INSERT_SUBREG1]], [[PseudoVMV_V_I_M1_1]], %subreg.sub_vrm1_2
121+
; CHECK-NEXT: [[INSERT_SUBREG3:%[0-9]+]]:vrn3m1 = INSERT_SUBREG [[INSERT_SUBREG2]], killed %6, %subreg.sub_vrm1_0
122+
; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr = COPY $x0
123+
; CHECK-NEXT: PseudoVSSEG3E64_V_M1 killed [[INSERT_SUBREG3]], [[COPY2]], 0, 6 /* e64 */ :: (store unknown-size into `ptr null`, align 8)
124+
; CHECK-NEXT: $x10 = COPY [[COPY2]]
125+
; CHECK-NEXT: PseudoRET implicit $x10
126+
%0:vr = PseudoVMV_V_I_MF2 $noreg, 0, -1, 5 /* e32 */, 0 /* tu, mu */
127+
%1:vrnov0 = PseudoVMV_V_V_MF2 $noreg, %0, 0, 5 /* e32 */, 0 /* tu, mu */
128+
%2:vr = PseudoVMCLR_M_B64 -1, 0 /* e8 */
129+
%4:vmv0 = COPY %2
130+
%3:vrnov0 = PseudoVXOR_VV_MF2_MASK %1, %0, %0, %4, 0, 5 /* e32 */, 0 /* tu, mu */
131+
%5:vrnov0 = PseudoVMV_V_I_M1 $noreg, 0, -1, 6 /* e64 */, 0 /* tu, mu */
132+
%7:vmv0 = COPY %2
133+
early-clobber %6:vrnov0 = PseudoVWMACC_VV_MF2_MASK %5, killed %3, %0, %7, 0, 5 /* e32 */, 0 /* tu, mu */
134+
%8:vr = PseudoVMV_V_I_M1 $noreg, 0, -1, 3 /* e8 */, 0 /* tu, mu */
135+
%10:vrn3m1 = IMPLICIT_DEF
136+
%9:vrn3m1 = INSERT_SUBREG %10, %8, %subreg.sub_vrm1_0
137+
%11:vrn3m1 = INSERT_SUBREG %9, %8, %subreg.sub_vrm1_1
138+
%12:vrn3m1 = INSERT_SUBREG %11, %8, %subreg.sub_vrm1_2
139+
%13:vrn3m1 = INSERT_SUBREG %12, killed %6, %subreg.sub_vrm1_0
140+
%14:gpr = COPY $x0
141+
PseudoVSSEG3E64_V_M1 killed %13, %14, 0, 6 /* e64 */ :: (store unknown-size into `ptr null`, align 8)
142+
$x10 = COPY %14
143+
PseudoRET implicit $x10
144+
...

0 commit comments

Comments
 (0)