File: stdux-constuse.ll

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (47 lines) | stat: -rw-r--r-- 1,516 bytes parent folder | download | duplicates (16)
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
37
38
39
40
41
42
43
44
45
46
47
; RUN: llc -verify-machineinstrs -mcpu=a2 -disable-lsr < %s | FileCheck %s
target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v128:128:128-n32:64"
target triple = "powerpc64-unknown-linux-gnu"

define i32 @test1(i64 %add, i64* %ptr) nounwind {
entry:
  %p1 = getelementptr i64, i64* %ptr, i64 144115188075855
  br label %for.cond2.preheader

for.cond2.preheader:
  %nl.018 = phi i32 [ 0, %entry ], [ %inc9, %for.end ]
  br label %for.body4

for.body4:
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body4 ], [ 16000, %for.cond2.preheader ]
  %i0 = phi i64* [ %p1, %for.cond2.preheader ], [ %i6, %for.body4 ]
  %i6 = getelementptr i64, i64* %i0, i64 400000
  %i7 = getelementptr i64, i64* %i6, i64 300000
  %i8 = getelementptr i64, i64* %i6, i64 200000
  %i9 = getelementptr i64, i64* %i6, i64 100000
  store i64 %add, i64* %i6, align 32
  store i64 %add, i64* %i7, align 32
  store i64 %add, i64* %i8, align 32
  store i64 %add, i64* %i9, align 32
  %lsr.iv.next = add i32 %lsr.iv, -16
  %exitcond.15 = icmp eq i32 %lsr.iv.next, 0
  br i1 %exitcond.15, label %for.end, label %for.body4

; Make sure that we generate the most compact form of this loop with no
; unnecessary moves
; CHECK: @test1
; CHECK: mtctr
; CHECK: stdux
; CHECK-NEXT: stdx
; CHECK-NEXT: stdx
; CHECK-NEXT: stdx
; CHECK-NEXT: bdnz

for.end:
  %inc9 = add nsw i32 %nl.018, 1
  %exitcond = icmp eq i32 %inc9, 400000
  br i1 %exitcond, label %for.end10, label %for.cond2.preheader

for.end10:
  ret i32 0
}