Skip to content

Commit 9e7f68e

Browse files
authored
Merge branch 'main' into fix/163498
2 parents 5a38474 + 8a84b28 commit 9e7f68e

File tree

72 files changed

+1612
-768
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+1612
-768
lines changed

clang/test/CodeGen/X86/math-builtins.c

Lines changed: 162 additions & 160 deletions
Large diffs are not rendered by default.

clang/test/CodeGen/builtin-sqrt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ float foo(float X) {
1111
// HAS_ERRNO-NOT: attributes [[ATTR]] = {{{.*}} memory(none)
1212

1313
// NO_ERRNO: declare float @llvm.sqrt.f32(float) [[ATTR:#[0-9]+]]
14-
// NO_ERRNO: attributes [[ATTR]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
14+
// NO_ERRNO: attributes [[ATTR]] = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) }
1515

clang/test/CodeGen/libcalls.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ void test_fma(float a0, double a1, long double a2) {
7474
// CHECK-YES: declare float @fmaf(float noundef, float noundef, float noundef)
7575
// CHECK-YES: declare double @fma(double noundef, double noundef, double noundef)
7676
// CHECK-YES: declare x86_fp80 @fmal(x86_fp80 noundef, x86_fp80 noundef, x86_fp80 noundef)
77-
// CHECK-NO: declare float @llvm.fma.f32(float, float, float) [[NUW_RN2:#[0-9]+]]
78-
// CHECK-NO: declare double @llvm.fma.f64(double, double, double) [[NUW_RN2]]
79-
// CHECK-NO: declare x86_fp80 @llvm.fma.f80(x86_fp80, x86_fp80, x86_fp80) [[NUW_RN2]]
77+
// CHECK-NO: declare float @llvm.fma.f32(float, float, float) [[NUW_RNI]]
78+
// CHECK-NO: declare double @llvm.fma.f64(double, double, double) [[NUW_RNI]]
79+
// CHECK-NO: declare x86_fp80 @llvm.fma.f80(x86_fp80, x86_fp80, x86_fp80) [[NUW_RNI]]
8080

8181
// Just checking to make sure these library functions are marked readnone
8282
void test_builtins(double d, float f, long double ld) {
@@ -85,19 +85,19 @@ void test_builtins(double d, float f, long double ld) {
8585
double atan_ = atan(d);
8686
long double atanl_ = atanl(ld);
8787
float atanf_ = atanf(f);
88-
// CHECK-NO: declare double @llvm.atan.f64(double) [[NUW_RNI:#[0-9]+]]
89-
// CHECK-NO: declare x86_fp80 @llvm.atan.f80(x86_fp80) [[NUW_RNI]]
90-
// CHECK-NO: declare float @llvm.atan.f32(float) [[NUW_RNI]]
88+
// CHECK-NO: declare double @llvm.atan.f64(double) [[NUW_RN2:#[0-9]+]]
89+
// CHECK-NO: declare x86_fp80 @llvm.atan.f80(x86_fp80) [[NUW_RN2]]
90+
// CHECK-NO: declare float @llvm.atan.f32(float) [[NUW_RN2]]
9191
// CHECK-YES: declare double @atan(double noundef) [[NUW:#[0-9]+]]
9292
// CHECK-YES: declare x86_fp80 @atanl(x86_fp80 noundef) [[NUW]]
9393
// CHECK-YES: declare float @atanf(float noundef) [[NUW]]
9494

9595
double atan2_ = atan2(d, 2);
9696
long double atan2l_ = atan2l(ld, ld);
9797
float atan2f_ = atan2f(f, f);
98-
// CHECK-NO: declare double @llvm.atan2.f64(double, double) [[NUW_RNI]]
99-
// CHECK-NO: declare x86_fp80 @llvm.atan2.f80(x86_fp80, x86_fp80) [[NUW_RNI]]
100-
// CHECK-NO: declare float @llvm.atan2.f32(float, float) [[NUW_RNI]]
98+
// CHECK-NO: declare double @llvm.atan2.f64(double, double) [[NUW_RN2]]
99+
// CHECK-NO: declare x86_fp80 @llvm.atan2.f80(x86_fp80, x86_fp80) [[NUW_RN2]]
100+
// CHECK-NO: declare float @llvm.atan2.f32(float, float) [[NUW_RN2]]
101101
// CHECK-YES: declare double @atan2(double noundef, double noundef) [[NUW]]
102102
// CHECK-YES: declare x86_fp80 @atan2l(x86_fp80 noundef, x86_fp80 noundef) [[NUW]]
103103
// CHECK-YES: declare float @atan2f(float noundef, float noundef) [[NUW]]
@@ -124,4 +124,4 @@ void test_builtins(double d, float f, long double ld) {
124124
}
125125

126126
// CHECK-YES: attributes [[NUW]] = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+cx8,+x87" }
127-
// CHECK-NO-DAG: attributes [[NUW_RNI]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
127+
// CHECK-NO-DAG: attributes [[NUW_RNI]] = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) }

clang/test/CodeGen/math-libcalls.c

Lines changed: 117 additions & 115 deletions
Large diffs are not rendered by default.

clang/test/CodeGenOpenCL/cl20-device-side-enqueue-attributes.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ kernel void device_side_enqueue(global float *a, global float *b, int i) {
199199
// SPIR32: attributes #[[ATTR0]] = { convergent noinline norecurse nounwind optnone "denormal-fp-math-f32"="preserve-sign,preserve-sign" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "uniform-work-group-size"="true" }
200200
// SPIR32: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
201201
// SPIR32: attributes #[[ATTR2]] = { convergent noinline nounwind optnone "denormal-fp-math-f32"="preserve-sign,preserve-sign" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }
202-
// SPIR32: attributes #[[ATTR3:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
202+
// SPIR32: attributes #[[ATTR3:[0-9]+]] = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) }
203203
// SPIR32: attributes #[[ATTR4]] = { convergent nounwind "denormal-fp-math-f32"="preserve-sign,preserve-sign" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }
204204
// SPIR32: attributes #[[ATTR5]] = { convergent nounwind "uniform-work-group-size"="true" }
205205
//.

compiler-rt/test/asan/TestCases/strcmp.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ int main(int argc, char **argv) {
1414
assert(strcmp(s1 - 1, s2));
1515

1616
// CHECK: {{.*ERROR: AddressSanitizer: stack-buffer-underflow on address}}
17-
// CHECK: READ of size 1
17+
// Very rarely `s1[-1]` happens to be '1', resulting in `strcmp` needing to
18+
// check 2 bytes before failing, rather than 1 - this should still pass
19+
// CHECK: READ of size {{[12]}}
1820
return 0;
1921
}

lldb/test/Shell/Recognizer/registration-unique.test

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# UNSUPPORTED: system-windows
2+
13
# Checks that the recognizers that should work across language runtimes
24
# are only registered once with the target.
35

@@ -41,14 +43,14 @@ frame recognizer list
4143
# CHECK-NEXT: no matching results found.
4244

4345
# CHECK: frame recognizer list
44-
# CHECK: Verbose Trap StackFrame Recognizer
45-
# CHECK: Assert StackFrame Recognizer
46+
# CHECK-DAG: Verbose Trap StackFrame Recognizer
47+
# CHECK-DAG: Assert StackFrame Recognizer
4648
# CHECK-NOT: Verbose Trap StackFrame Recognizer
4749
# CHECK-NOT: Assert StackFrame Recognizer
4850

4951
# FIXME: avoid duplicate frame recognizers in the target: https://github.com/llvm/llvm-project/issues/166341
5052
# CHECK: frame recognizer list
51-
# CHECK: Verbose Trap StackFrame Recognizer
52-
# CHECK: Assert StackFrame Recognizer
53-
# CHECK: Verbose Trap StackFrame Recognizer
54-
# CHECK: Assert StackFrame Recognizer
53+
# CHECK-DAG: Verbose Trap StackFrame Recognizer
54+
# CHECK-DAG: Assert StackFrame Recognizer
55+
# CHECK-DAG: Verbose Trap StackFrame Recognizer
56+
# CHECK-DAG: Assert StackFrame Recognizer

llvm/docs/CommandGuide/llvm-dwarfdump.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,15 @@ OPTIONS
134134

135135
Abbreviate the description of type unit entries.
136136

137+
.. option:: -t, --filter-child-tag
138+
139+
Only dump children whose DWARF tag is one of the specified tags.
140+
Example usage:
141+
142+
.. code-block:: c
143+
144+
llvm-dwarfdump -t DW_TAG_structure_type -t DW_TAG_member -c
145+
137146
.. option:: -x, --regex
138147

139148
Treat any <name> strings as regular expressions when searching

llvm/docs/LangRef.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2741,6 +2741,11 @@ For example:
27412741
``"nooutline"``
27422742
This attribute indicates that outlining passes should not modify the
27432743
function.
2744+
``nocreateundeforpoison``
2745+
This attribute indicates that the result of the function (prior to
2746+
application of return attributes/metadata) will not be undef or poison if
2747+
all arguments are not undef and not poison. Otherwise, it is undefined
2748+
behavior.
27442749

27452750
Call Site Attributes
27462751
----------------------

llvm/include/llvm/Analysis/ValueTracking.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,6 +1024,16 @@ findValuesAffectedByCondition(Value *Cond, bool IsAssume,
10241024
LLVM_ABI Value *stripNullTest(Value *V);
10251025
LLVM_ABI const Value *stripNullTest(const Value *V);
10261026

1027+
/// Enumerates all possible values of V and inserts them into the set \p
1028+
/// Constants. If \p AllowUndefOrPoison is false, it fails when V may contain
1029+
/// undef/poison elements. Returns true if the result is complete. Otherwise,
1030+
/// the result is incomplete (more than MaxCount values).
1031+
/// NOTE: The constant values are not distinct.
1032+
LLVM_ABI bool
1033+
collectPossibleValues(const Value *V,
1034+
SmallPtrSetImpl<const Constant *> &Constants,
1035+
unsigned MaxCount, bool AllowUndefOrPoison = true);
1036+
10271037
} // end namespace llvm
10281038

10291039
#endif // LLVM_ANALYSIS_VALUETRACKING_H

0 commit comments

Comments
 (0)