File: add-like-or.ll

package info (click to toggle)
llvm-toolchain-17 1%3A17.0.6-22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,799,624 kB
  • sloc: cpp: 6,428,607; ansic: 1,383,196; asm: 793,408; python: 223,504; objc: 75,364; f90: 60,502; lisp: 33,869; pascal: 15,282; sh: 9,684; perl: 7,453; ml: 4,937; awk: 3,523; makefile: 2,889; javascript: 2,149; xml: 888; fortran: 619; cs: 573
file content (57 lines) | stat: -rw-r--r-- 3,111 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
; RUN: opt < %s -S -disable-output "-passes=print<scalar-evolution>" 2>&1 | FileCheck %s

define i8 @or-of-constant-with-no-common-bits-set(i8 %x, i8 %y) {
; CHECK-LABEL: 'or-of-constant-with-no-common-bits-set'
; CHECK-NEXT:  Classifying expressions for: @or-of-constant-with-no-common-bits-set
; CHECK-NEXT:    %t0 = shl i8 %x, 2
; CHECK-NEXT:    --> (4 * %x) U: [0,-3) S: [-128,125)
; CHECK-NEXT:    %r = or i8 %t0, 3
; CHECK-NEXT:    --> (3 + (4 * %x))<nuw><nsw> U: [3,0) S: [-125,-128)
; CHECK-NEXT:  Determining loop execution counts for: @or-of-constant-with-no-common-bits-set
;
  %t0 = shl i8 %x, 2
  %r = or i8 %t0, 3
  ret i8 %r
}

define void @mask-high(i64 %arg, ptr dereferenceable(4) %arg1) {
; CHECK-LABEL: 'mask-high'
; CHECK-NEXT:  Classifying expressions for: @mask-high
; CHECK-NEXT:    %i = load i32, ptr %arg1, align 4
; CHECK-NEXT:    --> %i U: full-set S: full-set
; CHECK-NEXT:    %i2 = sext i32 %i to i64
; CHECK-NEXT:    --> (sext i32 %i to i64) U: [-2147483648,2147483648) S: [-2147483648,2147483648)
; CHECK-NEXT:    %i3 = and i64 %arg, -16
; CHECK-NEXT:    --> (16 * (%arg /u 16))<nuw> U: [0,-15) S: [-9223372036854775808,9223372036854775793)
; CHECK-NEXT:    %i4 = or i64 1, %i3
; CHECK-NEXT:    --> (1 + (16 * (%arg /u 16))<nuw>)<nuw><nsw> U: [1,-14) S: [-9223372036854775807,9223372036854775794)
; CHECK-NEXT:    %i7 = phi i64 [ %i4, %bb ], [ %i8, %bb6 ]
; CHECK-NEXT:    --> {(1 + (16 * (%arg /u 16))<nuw>)<nuw><nsw>,+,1}<%bb6> U: full-set S: full-set Exits: ((sext i32 %i to i64) smax (1 + (16 * (%arg /u 16))<nuw>)<nuw><nsw>) LoopDispositions: { %bb6: Computable }
; CHECK-NEXT:    %i8 = add i64 %i7, 1
; CHECK-NEXT:    --> {(2 + (16 * (%arg /u 16))<nuw>)<nuw><nsw>,+,1}<%bb6> U: full-set S: full-set Exits: (1 + ((sext i32 %i to i64) smax (1 + (16 * (%arg /u 16))<nuw>)<nuw><nsw>))<nsw> LoopDispositions: { %bb6: Computable }
; CHECK-NEXT:  Determining loop execution counts for: @mask-high
; CHECK-NEXT:  Loop %bb6: backedge-taken count is (-1 + (-16 * (%arg /u 16)) + ((sext i32 %i to i64) smax (1 + (16 * (%arg /u 16))<nuw>)<nuw><nsw>))
; CHECK-NEXT:  Loop %bb6: constant max backedge-taken count is -9223372034707292162
; CHECK-NEXT:  Loop %bb6: symbolic max backedge-taken count is (-1 + (-16 * (%arg /u 16)) + ((sext i32 %i to i64) smax (1 + (16 * (%arg /u 16))<nuw>)<nuw><nsw>))
; CHECK-NEXT:  Loop %bb6: Predicated backedge-taken count is (-1 + (-16 * (%arg /u 16)) + ((sext i32 %i to i64) smax (1 + (16 * (%arg /u 16))<nuw>)<nuw><nsw>))
; CHECK-NEXT:   Predicates:
; CHECK:       Loop %bb6: Trip multiple is 1
;
bb:
  %i = load i32, ptr %arg1, align 4
  %i2 = sext i32 %i to i64
  %i3 = and i64 %arg, -16
  %i4 = or i64 1, %i3
  %i5 = icmp sgt i64 %i4, %i2
  br i1 %i5, label %bb10, label %bb6

bb6:                                              ; preds = %bb6, %bb
  %i7 = phi i64 [ %i4, %bb ], [ %i8, %bb6 ]
  %i8 = add i64 %i7, 1
  %i9 = icmp slt i64 %i7, %i2
  br i1 %i9, label %bb6, label %bb10

bb10:                                             ; preds = %bb6, %bb
  ret void
}