File: SLP-cmp-cost-query.ll

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 1,998,492 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (36 lines) | stat: -rw-r--r-- 1,233 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
; REQUIRES: asserts
; RUN: opt -mtriple=systemz-unknown -mcpu=z13 -passes=slp-vectorizer -debug-only=SLP \
; RUN:   -S -disable-output < %s 2>&1 | FileCheck %s
;
; Check that SLP vectorizer gets the right cost difference for a compare
; node.

; Function Attrs: norecurse nounwind readonly
define void @fun(ptr nocapture, i32 zeroext) local_unnamed_addr #0 {
.lr.ph.preheader:
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %2 = phi i32 [ %., %.lr.ph ], [ undef, %.lr.ph.preheader ]
  %3 = phi i32 [ %.9, %.lr.ph ], [ undef, %.lr.ph.preheader ]
  %4 = icmp ult i32 %2, %1
  %5 = select i1 %4, i32 0, i32 %1
  %. = sub i32 %2, %5
  %6 = icmp ult i32 %3, %1
  %7 = select i1 %6, i32 0, i32 %1
  %.9 = sub i32 %3, %7
  %8 = zext i32 %. to i64
  %9 = getelementptr inbounds i8, ptr %0, i64 %8
  %10 = load i8, ptr %9, align 1
  %11 = zext i32 %.9 to i64
  %12 = getelementptr inbounds i8, ptr %0, i64 %11
  %13 = load i8, ptr %12, align 1
  %14 = icmp eq i8 %10, %13
  br i1 %14, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph
  ret void

; CHECK: SLP: Adding cost -1 for bundle n=2 [  %4 = icmp ult i32 %2, %1, ..]
}