File: allow_list.ll

package info (click to toggle)
llvm-toolchain-11 1%3A11.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 995,808 kB
  • sloc: cpp: 4,767,656; ansic: 760,916; asm: 477,436; python: 170,940; objc: 69,804; lisp: 29,914; sh: 23,855; f90: 18,173; pascal: 7,551; perl: 7,471; ml: 5,603; awk: 3,489; makefile: 2,573; xml: 915; cs: 573; fortran: 503; javascript: 452
file content (33 lines) | stat: -rw-r--r-- 1,268 bytes parent folder | download | duplicates (2)
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
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes
; RUN: opt -S -passes=attributor --attributor-seed-allow-list asd < %s | FileCheck %s --check-prefixes=CHECK_DISABLED
; RUN: opt -S -passes=attributor --attributor-seed-allow-list AAValueSimplify < %s | FileCheck %s --check-prefixes=CHECK_ENABLED

target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"

; Function Attrs: nounwind uwtable
define internal i32 @range_test(i32 %a) #0 {
; CHECK_DISABLED-LABEL: define {{[^@]+}}@range_test
; CHECK_DISABLED-SAME: (i32 [[A:%.*]])
; CHECK_DISABLED-NEXT:    [[TMP1:%.*]] = icmp sgt i32 [[A]], 100
; CHECK_DISABLED-NEXT:    [[TMP2:%.*]] = zext i1 [[TMP1]] to i32
; CHECK_DISABLED-NEXT:    ret i32 [[TMP2]]
;
  %1 = icmp sgt i32 %a, 100
  %2 = zext i1 %1 to i32
  ret i32 %2
}

; Function Attrs: nounwind uwtable
define i32 @range_use() #0 {
; CHECK_DISABLED-LABEL: define {{[^@]+}}@range_use()
; CHECK_DISABLED-NEXT:    [[TMP1:%.*]] = call i32 @range_test(i32 123)
; CHECK_DISABLED-NEXT:    ret i32 [[TMP1]]
;
; CHECK_ENABLED-LABEL: define {{[^@]+}}@range_use()
; CHECK_ENABLED-NEXT:    ret i32 1
;
  %1 = call i32 @range_test(i32 123)
  ret i32 %1
}

attributes #0 = { nounwind uwtable noinline }