File: no-fold-fcmp-dynamic-denormal-mode-issue114947.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 (118 lines) | stat: -rw-r--r-- 4,627 bytes parent folder | download | duplicates (5)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
; RUN: opt -S -passes=ipsccp < %s | FileCheck %s


define i1 @no_fold_fcmp_denormal_double_ieee_dynamic_denormal_undef() #0 {
; CHECK-LABEL: define i1 @no_fold_fcmp_denormal_double_ieee_dynamic_denormal_undef(
; CHECK-SAME: ) #[[ATTR0:[0-9]+]] {
; CHECK-NEXT:    [[CMP:%.*]] = fcmp une double 0x8000000000000, undef
; CHECK-NEXT:    ret i1 [[CMP]]
;
  %cmp = fcmp une double 0x8000000000000, undef
  ret i1 %cmp
}

define i1 @no_fold_fcmp_denormal_double_ieee_dynamic_denormal_poison() #0 {
; CHECK-LABEL: define i1 @no_fold_fcmp_denormal_double_ieee_dynamic_denormal_poison(
; CHECK-SAME: ) #[[ATTR0]] {
; CHECK-NEXT:    [[CMP:%.*]] = fcmp une double 0x8000000000000, poison
; CHECK-NEXT:    ret i1 [[CMP]]
;
  %cmp = fcmp une double 0x8000000000000, poison
  ret i1 %cmp
}

define i1 @no_fold_fcmp_denormal_double_ieee_dynamic() #0 {
; CHECK-LABEL: define i1 @no_fold_fcmp_denormal_double_ieee_dynamic(
; CHECK-SAME: ) #[[ATTR0]] {
; CHECK-NEXT:    [[CMP:%.*]] = fcmp une double 0x8000000000000, 0.000000e+00
; CHECK-NEXT:    ret i1 [[CMP]]
;
  %cmp = fcmp une double 0x8000000000000, 0.0
  ret i1 %cmp
}

define i1 @fold_fcmp_nondenormal_double_ieee_dynamic() #0 {
; CHECK-LABEL: define i1 @fold_fcmp_nondenormal_double_ieee_dynamic(
; CHECK-SAME: ) #[[ATTR0]] {
; CHECK-NEXT:    ret i1 true
;
  %cmp = fcmp une double 2.0, 0.0
  ret i1 %cmp
}

define <2 x i1> @no_fold_fcmp_denormal_double_ieee_dynamic_vector_splat() #0 {
; CHECK-LABEL: define <2 x i1> @no_fold_fcmp_denormal_double_ieee_dynamic_vector_splat(
; CHECK-SAME: ) #[[ATTR0]] {
; CHECK-NEXT:    [[CMP:%.*]] = fcmp une <2 x double> splat (double 0x8000000000000), zeroinitializer
; CHECK-NEXT:    ret <2 x i1> [[CMP]]
;
  %cmp = fcmp une <2 x double> splat (double 0x8000000000000), zeroinitializer
  ret <2 x i1> %cmp
}

define <2 x i1> @fold_fcmp_nondenormal_double_ieee_dynamic_vector_splat() #0 {
; CHECK-LABEL: define <2 x i1> @fold_fcmp_nondenormal_double_ieee_dynamic_vector_splat(
; CHECK-SAME: ) #[[ATTR0]] {
; CHECK-NEXT:    ret <2 x i1> splat (i1 true)
;
  %cmp = fcmp une <2 x double> splat (double 2.0), zeroinitializer
  ret <2 x i1> %cmp
}

define <2 x i1> @fold_fcmp_nondenormal_double_ieee_dynamic_vector_nonsplat() #0 {
; CHECK-LABEL: define <2 x i1> @fold_fcmp_nondenormal_double_ieee_dynamic_vector_nonsplat(
; CHECK-SAME: ) #[[ATTR0]] {
; CHECK-NEXT:    ret <2 x i1> <i1 false, i1 true>
;
  %cmp = fcmp une <2 x double> <double 2.0, double 4.0>, <double 2.0, double 8.0>
  ret <2 x i1> %cmp
}

define <3 x i1> @fold_fcmp_nondenormal_double_ieee_dynamic_vector_nonsplat_undef() #0 {
; CHECK-LABEL: define <3 x i1> @fold_fcmp_nondenormal_double_ieee_dynamic_vector_nonsplat_undef(
; CHECK-SAME: ) #[[ATTR0]] {
; CHECK-NEXT:    ret <3 x i1> <i1 true, i1 true, i1 false>
;
  %cmp = fcmp une <3 x double> <double 2.0, double undef, double 4.0>, <double 1.0, double undef, double 4.0>
  ret <3 x i1> %cmp
}

define <2 x i1> @fold_fcmp_nondenormal_double_ieee_dynamic_zero() #0 {
; CHECK-LABEL: define <2 x i1> @fold_fcmp_nondenormal_double_ieee_dynamic_zero(
; CHECK-SAME: ) #[[ATTR0]] {
; CHECK-NEXT:    ret <2 x i1> zeroinitializer
;
  %cmp = fcmp une <2 x double> zeroinitializer, zeroinitializer
  ret <2 x i1> %cmp
}

define <2 x i1> @no_fold_fcmp_denormal_double_ieee_dynamic_vector_nonsplat() #0 {
; CHECK-LABEL: define <2 x i1> @no_fold_fcmp_denormal_double_ieee_dynamic_vector_nonsplat(
; CHECK-SAME: ) #[[ATTR0]] {
; CHECK-NEXT:    [[CMP:%.*]] = fcmp une <2 x double> <double 0x8000000000000, double 1.000000e+00>, zeroinitializer
; CHECK-NEXT:    ret <2 x i1> [[CMP]]
;
  %cmp = fcmp une <2 x double> <double 0x8000000000000, double 1.0>, zeroinitializer
  ret <2 x i1> %cmp
}

define <vscale x 2 x i1> @fold_fcmp_nondenormal_double_ieee_dynamic_scalable_vector_splat() #0 {
; CHECK-LABEL: define <vscale x 2 x i1> @fold_fcmp_nondenormal_double_ieee_dynamic_scalable_vector_splat(
; CHECK-SAME: ) #[[ATTR0]] {
; CHECK-NEXT:    ret <vscale x 2 x i1> splat (i1 true)
;
  %cmp = fcmp une <vscale x 2 x double> splat (double 2.0), zeroinitializer
  ret <vscale x 2 x i1> %cmp
}

define <vscale x 2 x i1> @no_fold_fcmp_denormal_double_ieee_dynamic_scalaable_vector_splat() #0 {
; CHECK-LABEL: define <vscale x 2 x i1> @no_fold_fcmp_denormal_double_ieee_dynamic_scalaable_vector_splat(
; CHECK-SAME: ) #[[ATTR0]] {
; CHECK-NEXT:    ret <vscale x 2 x i1> splat (i1 true)
;
  %cmp = fcmp une <vscale x 2 x double> splat (double 0x8000000000000), zeroinitializer
  ret <vscale x 2 x i1> %cmp
}

attributes #0 = { "denormal-fp-math"="ieee,dynamic" }