File: cmp-extend.ll

package info (click to toggle)
llvm-toolchain-16 1%3A16.0.6-15~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,634,792 kB
  • sloc: cpp: 6,179,261; ansic: 1,216,205; asm: 741,319; python: 196,614; objc: 75,325; f90: 49,640; lisp: 32,396; pascal: 12,286; sh: 9,394; perl: 7,442; ml: 5,494; awk: 3,523; makefile: 2,723; javascript: 1,206; xml: 886; fortran: 581; cs: 573
file content (40 lines) | stat: -rw-r--r-- 1,459 bytes parent folder | download | duplicates (8)
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
; RUN: llc -march=hexagon < %s | FileCheck %s

%struct.RESULTS_S.A = type { i16, i16, i16, [4 x ptr], i32, i32, i32, ptr, %struct.MAT_PARAMS_S.D, i16, i16, i16, i16, i16, %struct.CORE_PORTABLE_S.E }
%struct.list_head_s.B = type { ptr, ptr }
%struct.list_data_s.C = type { i16, i16 }
%struct.MAT_PARAMS_S.D = type { i32, ptr, ptr, ptr }
%struct.CORE_PORTABLE_S.E = type { i8 }

; Test that we don't generate a zero extend in this case. Instead we generate
; a single sign extend instead of two zero extends.

; CHECK-NOT: zxth

; Function Attrs: nounwind
define void @core_bench_list(ptr %res) #0 {
entry:
  %seed3 = getelementptr inbounds %struct.RESULTS_S.A, ptr %res, i32 0, i32 2
  %0 = load i16, ptr %seed3, align 2
  %cmp364 = icmp sgt i16 %0, 0
  br i1 %cmp364, label %for.body, label %while.body19.i160

for.body:
  %i.0370 = phi i16 [ %inc50, %if.then ], [ 0, %entry ]
  br i1 undef, label %if.then, label %while.body.i273

while.body.i273:
  %tobool.i272 = icmp eq ptr undef, null
  br i1 %tobool.i272, label %if.then, label %while.body.i273

if.then:
  %inc50 = add i16 %i.0370, 1
  %exitcond = icmp eq i16 %inc50, %0
  br i1 %exitcond, label %while.body19.i160, label %for.body

while.body19.i160:
  br label %while.body19.i160
}

attributes #0 = { nounwind "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }