File: pr5145.ll

package info (click to toggle)
llvm-toolchain-20 1%3A20.1.6-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,111,304 kB
  • sloc: cpp: 7,438,677; ansic: 1,393,822; asm: 1,012,926; python: 241,650; f90: 86,635; objc: 75,479; lisp: 42,144; pascal: 17,286; sh: 10,027; ml: 5,082; perl: 4,730; awk: 3,523; makefile: 3,349; javascript: 2,251; xml: 892; fortran: 672
file content (62 lines) | stat: -rw-r--r-- 2,344 bytes parent folder | download | duplicates (6)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=x86_64-- < %s | FileCheck %s
@sc8 = external dso_local global i8

define void @atomic_maxmin_i8() {
; CHECK-LABEL: atomic_maxmin_i8:
; CHECK:       # %bb.0:
; CHECK-NEXT:    movzbl sc8(%rip), %eax
; CHECK-NEXT:    .p2align 4
; CHECK-NEXT:  .LBB0_1: # %atomicrmw.start14
; CHECK-NEXT:    # =>This Inner Loop Header: Depth=1
; CHECK-NEXT:    cmpb $6, %al
; CHECK-NEXT:    movzbl %al, %eax
; CHECK-NEXT:    movl $5, %ecx
; CHECK-NEXT:    cmovgel %eax, %ecx
; CHECK-NEXT:    # kill: def $al killed $al killed $eax
; CHECK-NEXT:    lock cmpxchgb %cl, sc8(%rip)
; CHECK-NEXT:    jne .LBB0_1
; CHECK-NEXT:  # %bb.2: # %atomicrmw.end13
; CHECK-NEXT:    movzbl sc8(%rip), %eax
; CHECK-NEXT:    .p2align 4
; CHECK-NEXT:  .LBB0_3: # %atomicrmw.start8
; CHECK-NEXT:    # =>This Inner Loop Header: Depth=1
; CHECK-NEXT:    cmpb $7, %al
; CHECK-NEXT:    movzbl %al, %eax
; CHECK-NEXT:    movl $6, %ecx
; CHECK-NEXT:    cmovll %eax, %ecx
; CHECK-NEXT:    # kill: def $al killed $al killed $eax
; CHECK-NEXT:    lock cmpxchgb %cl, sc8(%rip)
; CHECK-NEXT:    jne .LBB0_3
; CHECK-NEXT:  # %bb.4: # %atomicrmw.end7
; CHECK-NEXT:    movzbl sc8(%rip), %eax
; CHECK-NEXT:    .p2align 4
; CHECK-NEXT:  .LBB0_5: # %atomicrmw.start2
; CHECK-NEXT:    # =>This Inner Loop Header: Depth=1
; CHECK-NEXT:    cmpb $8, %al
; CHECK-NEXT:    movzbl %al, %eax
; CHECK-NEXT:    movl $7, %ecx
; CHECK-NEXT:    cmovael %eax, %ecx
; CHECK-NEXT:    # kill: def $al killed $al killed $eax
; CHECK-NEXT:    lock cmpxchgb %cl, sc8(%rip)
; CHECK-NEXT:    jne .LBB0_5
; CHECK-NEXT:  # %bb.6: # %atomicrmw.end1
; CHECK-NEXT:    movzbl sc8(%rip), %eax
; CHECK-NEXT:    .p2align 4
; CHECK-NEXT:  .LBB0_7: # %atomicrmw.start
; CHECK-NEXT:    # =>This Inner Loop Header: Depth=1
; CHECK-NEXT:    cmpb $9, %al
; CHECK-NEXT:    movzbl %al, %eax
; CHECK-NEXT:    movl $8, %ecx
; CHECK-NEXT:    cmovbl %eax, %ecx
; CHECK-NEXT:    # kill: def $al killed $al killed $eax
; CHECK-NEXT:    lock cmpxchgb %cl, sc8(%rip)
; CHECK-NEXT:    jne .LBB0_7
; CHECK-NEXT:  # %bb.8: # %atomicrmw.end
; CHECK-NEXT:    retq
  %1 = atomicrmw max  ptr @sc8, i8 5 acquire
  %2 = atomicrmw min  ptr @sc8, i8 6 acquire
  %3 = atomicrmw umax ptr @sc8, i8 7 acquire
  %4 = atomicrmw umin ptr @sc8, i8 8 acquire
  ret void
}