[llvm] [VPlan] Hook IR blocks into VPlan during skeleton creation (NFC) (PR #114292)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 30 13:45:37 PST 2024


================
@@ -7,11 +7,22 @@
 
  define void @vp_select(ptr noalias %a, ptr noalias %b, ptr noalias %c, i64 %N) {
  ; IF-EVL: VPlan 'Final VPlan for VF={vscale x 1,vscale x 2,vscale x 4},UF={1}' {
- ; IF-EVL-NEXT: Live-in vp<[[VFUF:%[0-9]+]]> = VF * UF
- ; IF-EVL-NEXT: Live-in vp<[[VTC:%[0-9]+]]> = vector-trip-count
+ ; IF-EVL-NEXT: Live-in ir<%8> = VF * UF
+ ; IF-EVL-NEXT: Live-in ir<%n.vec> = vector-trip-count
  ; IF-EVL-NEXT: Live-in ir<%N> = original trip-count
 
- ; IF-EVL: vector.ph:
+ ; IF-EVL:      ir-bb<entry>:
+ ; IF-EVL-NEXT: Successor(s): ir-bb<scalar.ph>, ir-bb<vector.ph>
+
+ ; IF-EVL:      ir-bb<vector.ph>:
+ ; IF-EVL-NEXT:   IR   %4 = call i64 @llvm.vscale.i64()
+ ; IF-EVL-NEXT:   IR   %5 = mul i64 %4, 4
+ ; IF-EVL-NEXT:   IR   %6 = sub i64 %5, 1
+ ; IF-EVL-NEXT:   IR   %n.rnd.up = add i64 %N, %6
+ ; IF-EVL-NEXT:   IR   %n.mod.vf = urem i64 %n.rnd.up, %5
+ ; IF-EVL-NEXT:   IR   %n.vec = sub i64 %n.rnd.up, %n.mod.vf
+ ; IF-EVL-NEXT:   IR   %7 = call i64 @llvm.vscale.i64()
+ ; IF-EVL-NEXT:   IR   %8 = mul i64 %7, 4
----------------
fhahn wrote:

we are now matching the VPIRBB

https://github.com/llvm/llvm-project/pull/114292


More information about the llvm-commits mailing list