File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
llvm/test/Transforms/LoopVectorize/AArch64 Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 7373 %1 = select i1 %all.off , i32 1 , i32 %0
7474 ret i32 %1
7575}
76+
77+ define i32 @select_vpinst_for_tail_folding (i8 %n ) {
78+ ; CHECK: LV: Checking a loop in 'select_vpinst_for_tail_folding'
79+ ; CHECK: Cost of 6 for VF 2: EMIT vp<{{.+}}> = select vp<{{.+}}>, ir<%red.next>, ir<%red>
80+ ; CHECK: Cost of 12 for VF 4: EMIT vp<{{.+}}> = select vp<{{.+}}>, ir<%red.next>, ir<%red>
81+ ; CHECK: LV: Selecting VF: 1
82+
83+ entry:
84+ %c = icmp ne i8 %n , 0
85+ %ext = zext i1 %c to i32
86+ br label %loop
87+
88+ loop:
89+ %iv = phi i32 [ %ext , %entry ], [ %iv.next , %loop ]
90+ %red = phi i32 [ 0 , %entry ], [ %red.next , %loop ]
91+ %iv.next = add i32 %iv , 1
92+ %red.next = mul i32 %red , %iv
93+ %ec = icmp eq i32 %iv , 12
94+ br i1 %ec , label %exit , label %loop
95+
96+ exit:
97+ ret i32 %red.next
98+ }
You can’t perform that action at this time.
0 commit comments