Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable logf128 constant folding for hosts with 128bit long double #96287

Merged
merged 8 commits into from
Aug 9, 2024

Conversation

MDevereau
Copy link
Contributor

@MDevereau MDevereau commented Jun 21, 2024

Hosts with a long double size of 128 bits can benefit from constant fp128 folding. GCC versions more recent than version 12 must use the _Float128 type for logf128.

AArch64 has a long double bit length of 128. Therefore, it can benefit
from constant fp128 folding. GCC versions more recent than version 12
must use the _Float128 type for logf128.
@MDevereau MDevereau marked this pull request as ready for review June 21, 2024 11:44
@llvmbot
Copy link
Member

llvmbot commented Jun 21, 2024

@llvm/pr-subscribers-llvm-adt
@llvm/pr-subscribers-llvm-support

@llvm/pr-subscribers-llvm-analysis

Author: Matthew Devereau (MDevereau)

Changes

AArch64 has a long double bit length of 128. Therefore, it can benefit from constant fp128 folding. GCC versions more recent than version 12 must use the _Float128 type for logf128.


Full diff: https://github.com/llvm/llvm-project/pull/96287.diff

2 Files Affected:

  • (modified) llvm/include/llvm/Support/float128.h (+8-1)
  • (modified) llvm/lib/Analysis/ConstantFolding.cpp (+2-2)
diff --git a/llvm/include/llvm/Support/float128.h b/llvm/include/llvm/Support/float128.h
index e15a98dc5a677..f1931c145f0fc 100644
--- a/llvm/include/llvm/Support/float128.h
+++ b/llvm/include/llvm/Support/float128.h
@@ -11,7 +11,14 @@
 
 namespace llvm {
 
-#if defined(__clang__) && defined(__FLOAT128__) &&                             \
+#if defined(__aarch64__)
+#define HAS_IEE754_FLOAT128
+#if (defined(__GNUC__) && __GNUC__ > 12)
+typedef _Float128 float128;
+#else
+typedef long double float128;
+#endif
+#elif defined(__clang__) && defined(__FLOAT128__) &&                           \
     defined(__SIZEOF_INT128__) && !defined(__LONG_DOUBLE_IBM128__)
 #define HAS_IEE754_FLOAT128
 typedef __float128 float128;
diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp
index 512d1aadd5346..4329d2e9a0556 100644
--- a/llvm/lib/Analysis/ConstantFolding.cpp
+++ b/llvm/lib/Analysis/ConstantFolding.cpp
@@ -1784,8 +1784,8 @@ Constant *ConstantFoldFP(double (*NativeFP)(double), const APFloat &V,
 }
 
 #if defined(HAS_IEE754_FLOAT128) && defined(HAS_LOGF128)
-Constant *ConstantFoldFP128(long double (*NativeFP)(long double),
-                            const APFloat &V, Type *Ty) {
+Constant *ConstantFoldFP128(float128 (*NativeFP)(float128), const APFloat &V,
+                            Type *Ty) {
   llvm_fenv_clearexcept();
   float128 Result = NativeFP(V.convertToQuad());
   if (llvm_fenv_testexcept()) {

@efriedma-quic
Copy link
Collaborator

I don't understand how this works. logf128 is defined to take a _Float128, by the C standard. long double is not _Float128, and is not compatible with _Float128. Therefore, it should not be possible to implicitly convert a _Float128(*)(_Float128) to long double (*)(long double).

Copy link
Collaborator

@davemgreen davemgreen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logf128 is defined to take a _Float128, by the C standard. long double is not _Float128, and is not compatible with _Float128. Therefore, it should not be possible to implicitly convert a _Float128()(_Float128) to long double ()(long double).

Hi - Can you explain more about how they are not compatible? Do you just mean at a type/C level? I thought that if they were the same size they would operate in the same way (i.e logl is just an alias to logf128 in libm on the system I have).

@@ -11,7 +11,14 @@

namespace llvm {

#if defined(__clang__) && defined(__FLOAT128__) && \
#if defined(__aarch64__)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect we might need to be careful of systems that have long-double==double, such as windows and darwin targets.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a check for the mantissa size now which should help with this.

@MDevereau
Copy link
Contributor Author

I don't understand how this works. logf128 is defined to take a _Float128, by the C standard. long double is not _Float128, and is not compatible with _Float128. Therefore, it should not be possible to implicitly convert a _Float128()(_Float128) to long double ()(long double).

This was the rationale for the typedef of _Float128 to float128 for gcc versions higher than 12 and why the changes in ConstantFolding.cpp were warranted. It appears pre gcc13, logf128 did not use the _Float128 type but rather an alias of long double or __float128. What this typedef does is remove the implicit conversion which gives an error message.
https://godbolt.org/z/5bdneMz9o
https://godbolt.org/z/fMf8oKor1

You can see this was not an issue in gcc12
https://godbolt.org/z/vs5eaxvE9

@efriedma-quic
Copy link
Collaborator

Oh, I see, gcc 13 has _Float128, and on older versions glibc typedefs it to long double.

Can we make this not AArch64-specific? It seems like it affects any target where long double is 128 its.

@MDevereau
Copy link
Contributor Author

MDevereau commented Jun 25, 2024

Oh, I see, gcc 13 has _Float128, and on older versions glibc typedefs it to long double.

Can we make this not AArch64-specific? It seems like it affects any target where long double is 128 its.

I'm not opposed to the idea of making this non AArch64-specific, but on further inspection it seems logf128 using _Float128/__float128/long double isn't consistent with GCC/Clang versions across hosts.

While trying to figure out which host/compiler combinations were appropriate to use, it quickly got quite confusing. Including math.h seems to typedef long double to _Float128 under certain circumstances, but support for the original untypedef'd types seems to vary.
I ran this test (https://godbolt.org/z/f1c9q9jh4) while substituting the type to check which compiler/host combination works for the types without including math.h. I'm interested in AArch64/x86 supporting this predominantly so I've included those:

AArch64:

Type GCC-13.1 GCC-12.4 Clang-18.1
_Float128 pass fail fail
__float128 fail fail fail
long double pass pass pass

x86:

Type GCC-13.1 GCC-12.4 Clang-18.1
_Float128 pass fail fail
__float128 pass pass pass
long double pass pass pass

Where it gets interesting is when using these types as parameters to logf128 from math.h. In GCC-13 and over logf128 appears to be a builtin which takes _Float128 and does not allow implicit conversions, but on x86 logf128 seems to throw when given long double. I then ran this logf128 function pointer test (https://godbolt.org/z/GvM78hbbh) for the same host/target combinations and got these results:

AArch64:

Type GCC-13.1 GCC-12.4 Clang-18.1
_Float128 pass pass pass
__float128 fail fail fail
long double fail pass pass

x86:

Type GCC-13.1 GCC-12.4 Clang-18.1
_Float128 pass pass fail
__float128 fail pass fail
long double fail fail fail

So while x86 has a long double length of 128 bits, I don't think it's ok to enable this based on long double information alone. It looks like the only way to stay sane in this scenario is to do it on a per host and per compiler basis.

@efriedma-quic
Copy link
Collaborator

I'd still prefer to use some sort of detection. If you can't figure out a way to do it in the header itself, please use CMake tests.

Also enable optimisation without cmake opt-in
@llvmbot llvmbot added the cmake Build system in general and CMake in particular label Jun 26, 2024
@MDevereau
Copy link
Contributor Author

I'd still prefer to use some sort of detection. If you can't figure out a way to do it in the header itself, please use CMake tests.

I've added detection of long double size. Confusingly some x86 targets defined long double as 16 bytes but are actually fp80 types, so I've checked the size of the mantissa too. I've also removed the CMake opt-in and detect logf128 by default now.

@MDevereau MDevereau changed the title Enable logf128 constant folding for AArch64 Enable logf128 constant folding for hosts with 128bit long double Jun 28, 2024
#if !defined(__LONG_DOUBLE_IBM128__) && (__SIZEOF_LONG_DOUBLE__ == 16) && \
(__SIZEOF_INT128__ == 16) && (__LDBL_MANT_DIG__ == 113)
#define HAS_IEE754_FLOAT128
#if (defined(__GNUC__) && __GNUC__ > 12)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of explicitly checking the gcc version, can we typedef decltype(logf128(0.)) float128; or something like that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would require including math.h in this file (which isn't a problem but worth mentioning). It's also possible for hosts to satisfy the condition and fall through to this but not have logf128 (I've seen x86 with clang do this). It's possible to add HAS_LOGF128 to the check, which is set at CMake time in order to get around this, but this isn't really about logf128 and more about the 128 bit floating-point types themselves. Granted, my logf128 patches are the only thing using this, but it still seems incorrect.

Apart from this, it does function well though.

Copy link
Collaborator

@efriedma-quic efriedma-quic Jul 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm mostly concerned that checking for __GNUC__ is overly specific, and might break on compilers you haven't seen, or compilers which don't exist yet (e.g. if clang's support for _Float128 changes).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've instead decided to move to a CMake test which checks the availability of logf128, the availability of a true 128bit float type and that type's compatibility with the logf128 symbol to receive accurate answers instead of trying to do this inside a header file.

A problem I faced when trying to run this on an x86 machine was that the size of long doubles were defined to be 16 bytes (when they are actually fp80) however calling logf128 with this type caused error codes to be returned from the function while compiling without issue. Using __float128 which is guaranteed to perform a 128 bit calculation even though the machine uses fp80 works OK though. I'm seeing both x86 with fp80 and aarch64 compile and run this without issues now. Instead of explicitly checking the GCC version, the _Float128 type which is available in GCC12+ is now asserted for availability and correctness and used if it is available.

file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/logf128_long_double.cpp"
"
extern \"C\" {
long double logf128(long double);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd prefer to have CMake tests which #include <cmath>, to verify that the header actually works.

Along those lines, I don't think float128.h should be declaring logf128.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason I ended up doing things this way is because Clang on x86 doesn't pick up the logf128 symbol when including cmath. Clang just doesn't seem to have the magic definitions to unlock it like GCC does. It's probably okay to include cmath for long double and _Float128, but for clang I think we do need to explicitly declare the function prototype to get it working on x86.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the initial patch, let's just handle the case where logf128 is actually declared in math.h. The case where glibc actually provides logf128, but doesn't declare it, is a weird edge case, and I'd prefer to handle it in a followup patch.

unset(LOGF128_TEST_RUN CACHE)
unset(LOGF128_TEST_COMPILE CACHE)
try_run(
LOGF128_TEST_RUN
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using try_run tends to lead to strange results with cross-compiling; do we really need it here? _Float128/__float128 should always mean what we want it to, and we can use __LDBL_MANT_DIG__ for long double.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

x86 hosts with 80bit long doubles can compile logf128 but will return an error code. __LDBL_MANT_DIG__ does work fine for hosts with 128bit long doubles, but this will also disable the fold for x86 targets with fp80 that can still perform an accurate fold with __float128 types. I'm struggling to think of an alternative way to select the most valid and best type at compile time to use without try_run based on the following criteria:

Logf128 symbol availability
Logf128 function prototype availability
Long double total size (Needs to be 16 bytes)
Long double mantissa size (Rules out fp80)
GCC version(12+ won't accept anything other than _Float128 for logf128)
If we're compiling with GCC or Clang (Clang needs to declare the logf128 prototype)
__float128 availability
_Float128 availability

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You only need to check __LDBL_MANT_DIG__ if you're trying to use the type long double. You can assume __float128 and _Float128 have the right format.

Copy link
Contributor Author

@MDevereau MDevereau Jul 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Firstly, thanks for your patience with this review.

I'm still unsure how to differentiate in a header file between _Float128 and long double for GCC12+, where trying to pass in anything other than GCC 12+'s dedicated _Float128 type will cause a compilation error. A condition along the lines of

#if (__LDBL_MANT_DIG__ == 113) && !defined(__LONG_DOUBLE_IBM128__) && (__SIZEOF_INT128__ == 16)
typedef long double float128;
#else

will be valid for GCC12 and GCC11 while it is actually only valid for GCC11: long double isn't valid for logf128 anymore after GCC12, but the host still has a long double mantissa size of 113.

I think you're suggesting I do typedef decltype(logf128(0.)) float128; only when long double is known to have a mantissa of 113, and worry about hosts that have access to float128 but have a manstissa of not 113 in a following patch. I just wanted to double check.

!defined(__LONG_DOUBLE_IBM128__) && \
(defined(__GNUC__) || defined(__GNUG__))
#ifdef HAS_LOGF128
#if (__LDBL_MANT_DIG__ == 113) && !defined(__LONG_DOUBLE_IBM128__) && \
Copy link
Collaborator

@efriedma-quic efriedma-quic Jul 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the check for __LDBL_MANT_DIG__ necessary with the current version?

Otherwise, this approach seems fine.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I was suggesting LDBL_MANT_DIG with the old version that explicitly wrote out the type "long double". It should be safe to assume that if logf128 returns a long double, then long double is actually an IEEE 128-bit float.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late update, I've been away for a few weeks. I believe its unnecessary in this version, if HAS_LOGF128 is true the logf128 function prototype should return a valid IEEE 128-bit float.

I believe this will expose a problem I've seen where x86 targets with fp80 will return a slightly different result from AArch64. I.e., AArch64's 0xL00000000000000007FFF800000000000 vs x86's 0xL0000000000000000FFFF800000000000 for the Constant folding test log_e_negative_infinity and a few others. I'm not sure if this is due to a target specific implementation of logf128 currently.

Copy link
Collaborator

@efriedma-quic efriedma-quic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 9, 2024

LLVM Buildbot has detected a new failure on builder clang-ppc64le-linux-multistage running on ppc64le-clang-multistage-test while building llvm at step 5 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/76/builds/1703

Here is the relevant piece of the build log for the reference:

Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'LLVM :: Transforms/InstSimplify/ConstProp/logf128.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/bin/opt < /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll -passes=instsimplify -S | /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/bin/FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/bin/opt -passes=instsimplify -S
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/bin/FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll:10:15: error: CHECK-NEXT: expected string not found in input
; CHECK-NEXT: ret fp128 0xL300000000000000040010A2B23F3BAB7
              ^
<stdin>:9:27: note: scanning from here
define fp128 @log_e_64() {
                          ^
<stdin>:10:43: note: possible intended match here
 %A = call fp128 @llvm.log.f128(fp128 noundef 0xL00000000000000004005000000000000)
                                          ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll:18:15: error: CHECK-NEXT: expected string not found in input
; CHECK-NEXT: ret fp128 0xL3000000000000000C00C654628220780
              ^
<stdin>:14:59: note: scanning from here
define fp128 @log_e_smallest_positive_subnormal_number() {
                                                          ^
<stdin>:15:43: note: possible intended match here
 %A = call fp128 @llvm.log.f128(fp128 noundef 0xL00000000000000010000000000000000)
                                          ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll:26:15: error: CHECK-NEXT: expected string not found in input
; CHECK-NEXT: ret fp128 0xLD000000000000000C00C62D918CE2421
              ^
<stdin>:19:49: note: scanning from here
define fp128 @log_e_largest_subnormal_number() {
                                                ^
<stdin>:21:2: note: possible intended match here
 ret fp128 %A
 ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll:35:15: error: CHECK-NEXT: expected string not found in input
; CHECK-NEXT: ret fp128 0xLD000000000000000C00C62D918CE2421
              ^
<stdin>:24:56: note: scanning from here
define fp128 @log_e_smallest_positive_normal_number() {
                                                       ^
<stdin>:25:43: note: possible intended match here
 %A = call fp128 @llvm.log.f128(fp128 noundef 0xL00000000000000000001000000000000)
                                          ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll:43:15: error: CHECK-NEXT: expected string not found in input
; CHECK-NEXT: ret fp128 0xLF000000000000000400C62E42FEFA39E
              ^
<stdin>:29:46: note: scanning from here
define fp128 @log_e_largest_normal_number() {
                                             ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 9, 2024

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux running on sanitizer-buildbot2 while building llvm at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/2673

Here is the relevant piece of the build log for the reference:

Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
[374/378] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.x86_64-with-call.o
[375/378] Generating Msan-x86_64-with-call-Test
[376/378] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.x86_64.o
[377/378] Generating Msan-x86_64-Test
[377/378] Running compiler_rt regression tests
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/llvm/utils/lit/lit/discovery.py:276: warning: input '/home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/rtsan/X86_64LinuxConfig' contained no tests
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 10106 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
TIMEOUT: SanitizerCommon-hwasan-x86_64-Linux :: Posix/fork_threaded.c (10106 of 10106)
******************** TEST 'SanitizerCommon-hwasan-x86_64-Linux :: Posix/fork_threaded.c' FAILED ********************
Exit Code: 137
Timeout: Reached timeout of 900 seconds

Command Output (stderr):
--
RUN: at line 1: /home/b/sanitizer-x86_64-linux/build/build_default/./bin/clang  -gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -fsanitize-hwaddress-experimental-aliasing  -m64 -funwind-tables  -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test -ldl -O0 /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.c -o /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/hwasan-x86_64-Linux/Posix/Output/fork_threaded.c.tmp && env HWASAN_OPTIONS=die_after_fork=0  /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/hwasan-x86_64-Linux/Posix/Output/fork_threaded.c.tmp
+ /home/b/sanitizer-x86_64-linux/build/build_default/./bin/clang -gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -fsanitize-hwaddress-experimental-aliasing -m64 -funwind-tables -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test -ldl -O0 /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.c -o /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/hwasan-x86_64-Linux/Posix/Output/fork_threaded.c.tmp
+ env HWASAN_OPTIONS=die_after_fork=0 /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/hwasan-x86_64-Linux/Posix/Output/fork_threaded.c.tmp
==899652==ERROR: HWAddressSanitizer: allocation-tail-overwritten; heap object [0x480600001860,0x480600001888) of size 40
==898802==ERROR: HWAddressSanitizer: allocation-tail-overwritten; heap object [0x480600001860,0x480600001888) of size 40


Stack of invalid access unknown. Issue detected at deallocation time.
Stack of invalid access unknown. Issue detected at deallocation time.
deallocated here:
deallocated here:
/home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/hwasan-x86_64-Linux/Posix/Output/fork_threaded.c.script: line 1: 898802 Killed                  env HWASAN_OPTIONS=die_after_fork=0 /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/hwasan-x86_64-Linux/Posix/Output/fork_threaded.c.tmp

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 

1 warning(s) in tests
Slowest Tests:
--------------------------------------------------------------------------
900.05s: SanitizerCommon-hwasan-x86_64-Linux :: Posix/fork_threaded.c
218.70s: libFuzzer-x86_64-default-Linux :: out-of-process-fuzz.test
213.25s: libFuzzer-x86_64-libcxx-Linux :: out-of-process-fuzz.test
207.26s: libFuzzer-x86_64-static-libcxx-Linux :: out-of-process-fuzz.test
42.16s: libFuzzer-i386-default-Linux :: fork_corpus_groups.test
41.42s: libFuzzer-i386-libcxx-Linux :: fork_corpus_groups.test
39.60s: libFuzzer-i386-static-libcxx-Linux :: fork.test
39.35s: libFuzzer-x86_64-libcxx-Linux :: fork_corpus_groups.test
39.35s: libFuzzer-i386-default-Linux :: fork.test
39.11s: libFuzzer-x86_64-libcxx-Linux :: fork.test
39.05s: libFuzzer-i386-libcxx-Linux :: fork.test
38.79s: libFuzzer-i386-static-libcxx-Linux :: fork_corpus_groups.test
Step 9 (test compiler-rt symbolizer) failure: test compiler-rt symbolizer (failure)
...
[374/378] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.x86_64-with-call.o
[375/378] Generating Msan-x86_64-with-call-Test
[376/378] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.x86_64.o
[377/378] Generating Msan-x86_64-Test
[377/378] Running compiler_rt regression tests
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/llvm/utils/lit/lit/discovery.py:276: warning: input '/home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/rtsan/X86_64LinuxConfig' contained no tests
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 10106 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
TIMEOUT: SanitizerCommon-hwasan-x86_64-Linux :: Posix/fork_threaded.c (10106 of 10106)
******************** TEST 'SanitizerCommon-hwasan-x86_64-Linux :: Posix/fork_threaded.c' FAILED ********************
Exit Code: 137
Timeout: Reached timeout of 900 seconds

Command Output (stderr):
--
RUN: at line 1: /home/b/sanitizer-x86_64-linux/build/build_default/./bin/clang  -gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -fsanitize-hwaddress-experimental-aliasing  -m64 -funwind-tables  -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test -ldl -O0 /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.c -o /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/hwasan-x86_64-Linux/Posix/Output/fork_threaded.c.tmp && env HWASAN_OPTIONS=die_after_fork=0  /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/hwasan-x86_64-Linux/Posix/Output/fork_threaded.c.tmp
+ /home/b/sanitizer-x86_64-linux/build/build_default/./bin/clang -gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -fsanitize-hwaddress-experimental-aliasing -m64 -funwind-tables -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test -ldl -O0 /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.c -o /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/hwasan-x86_64-Linux/Posix/Output/fork_threaded.c.tmp
+ env HWASAN_OPTIONS=die_after_fork=0 /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/hwasan-x86_64-Linux/Posix/Output/fork_threaded.c.tmp
==899652==ERROR: HWAddressSanitizer: allocation-tail-overwritten; heap object [0x480600001860,0x480600001888) of size 40
==898802==ERROR: HWAddressSanitizer: allocation-tail-overwritten; heap object [0x480600001860,0x480600001888) of size 40


Stack of invalid access unknown. Issue detected at deallocation time.
Stack of invalid access unknown. Issue detected at deallocation time.
deallocated here:
deallocated here:
/home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/hwasan-x86_64-Linux/Posix/Output/fork_threaded.c.script: line 1: 898802 Killed                  env HWASAN_OPTIONS=die_after_fork=0 /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/hwasan-x86_64-Linux/Posix/Output/fork_threaded.c.tmp

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..

1 warning(s) in tests
Slowest Tests:
--------------------------------------------------------------------------
900.05s: SanitizerCommon-hwasan-x86_64-Linux :: Posix/fork_threaded.c
218.70s: libFuzzer-x86_64-default-Linux :: out-of-process-fuzz.test
213.25s: libFuzzer-x86_64-libcxx-Linux :: out-of-process-fuzz.test
207.26s: libFuzzer-x86_64-static-libcxx-Linux :: out-of-process-fuzz.test
42.16s: libFuzzer-i386-default-Linux :: fork_corpus_groups.test
41.42s: libFuzzer-i386-libcxx-Linux :: fork_corpus_groups.test
39.60s: libFuzzer-i386-static-libcxx-Linux :: fork.test
39.35s: libFuzzer-x86_64-libcxx-Linux :: fork_corpus_groups.test
39.35s: libFuzzer-i386-default-Linux :: fork.test
39.11s: libFuzzer-x86_64-libcxx-Linux :: fork.test
39.05s: libFuzzer-i386-libcxx-Linux :: fork.test
38.79s: libFuzzer-i386-static-libcxx-Linux :: fork_corpus_groups.test

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 9, 2024

LLVM Buildbot has detected a new failure on builder premerge-monolithic-windows running on premerge-windows-1 while building llvm at step 5 "clean-build-dir".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/35/builds/1741

Here is the relevant piece of the build log for the reference:

Step 5 (clean-build-dir) failure: Delete failed. (failure)
Step 7 (build-unified-tree) failure: build (failure)
...
[8090/12489] Building CXX object tools\flang\lib\Semantics\CMakeFiles\FortranSemantics.dir\semantics.cpp.obj
C:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Semantics\semantics.cpp(667): warning C4927: illegal conversion; more than one user-defined conversion has been implicitly applied
C:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Semantics\semantics.cpp(667): note: while calling the constructor 'Fortran::semantics::Symbol::Symbol(const Fortran::semantics::Symbol &) noexcept(false)'
C:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\include\flang\Semantics\symbol.h(959): note: compiler has generated 'Fortran::semantics::Symbol::Symbol' here
[8091/12489] Building CXX object tools\flang\lib\Semantics\CMakeFiles\FortranSemantics.dir\symbol.cpp.obj
[8092/12489] Building CXX object tools\flang\lib\Semantics\CMakeFiles\FortranSemantics.dir\tools.cpp.obj
[8093/12489] Building CXX object tools\flang\lib\Semantics\CMakeFiles\FortranSemantics.dir\type.cpp.obj
[8094/12489] Building CXX object tools\flang\lib\Semantics\CMakeFiles\FortranSemantics.dir\unparse-with-symbols.cpp.obj
[8095/12489] Building CXX object tools\flang\lib\Frontend\CMakeFiles\flangFrontend.dir\CodeGenOptions.cpp.obj
[8096/12489] Building CXX object tools\flang\lib\Frontend\CMakeFiles\flangFrontend.dir\CompilerInstance.cpp.obj
FAILED: tools/flang/lib/Frontend/CMakeFiles/flangFrontend.dir/CompilerInstance.cpp.obj 
sccache C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe  /nologo /TP -DBUILD_EXAMPLES -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools\flang\lib\Frontend -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Frontend -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\include -Itools\flang\include -Iinclude -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\mlir\include -Itools\mlir\include -Itools\clang\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\clang\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -w14062 -we4238 /Gw /O2 /Ob2  -MD  /EHs-c- /GR- -UNDEBUG -std:c++17 /showIncludes /Fotools\flang\lib\Frontend\CMakeFiles\flangFrontend.dir\CompilerInstance.cpp.obj /Fdtools\flang\lib\Frontend\CMakeFiles\flangFrontend.dir\flangFrontend.pdb /FS -c C:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Frontend\CompilerInstance.cpp
C:\BuildTools\VC\Tools\MSVC\14.29.30133\include\vector(2496): fatal error C1060: compiler is out of heap space
[8097/12489] Linking CXX static library lib\FortranSemantics.lib
[8098/12489] Building CXX object tools\flang\lib\Lower\CMakeFiles\FortranLower.dir\VectorSubscripts.cpp.obj
FAILED: tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/VectorSubscripts.cpp.obj 
sccache C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe  /nologo /TP -DBUILD_EXAMPLES -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\include -Itools\flang\include -Iinclude -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\mlir\include -Itools\mlir\include -Itools\clang\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\clang\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -w14062 -we4238 /Gw /O2 /Ob2  -MD  /EHs-c- /GR- -UNDEBUG -std:c++17 /showIncludes /Fotools\flang\lib\Lower\CMakeFiles\FortranLower.dir\VectorSubscripts.cpp.obj /Fdtools\flang\lib\Lower\CMakeFiles\FortranLower.dir\FortranLower.pdb /FS -c C:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower\VectorSubscripts.cpp
C:\BuildTools\VC\Tools\MSVC\14.29.30133\include\variant(166): fatal error C1060: compiler is out of heap space
[8099/12489] Building CXX object tools\flang\lib\Lower\CMakeFiles\FortranLower.dir\OpenACC.cpp.obj
FAILED: tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenACC.cpp.obj 
sccache C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe  /nologo /TP -DBUILD_EXAMPLES -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\include -Itools\flang\include -Iinclude -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\mlir\include -Itools\mlir\include -Itools\clang\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\clang\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -w14062 -we4238 /Gw /O2 /Ob2  -MD  /EHs-c- /GR- -UNDEBUG -std:c++17 /showIncludes /Fotools\flang\lib\Lower\CMakeFiles\FortranLower.dir\OpenACC.cpp.obj /Fdtools\flang\lib\Lower\CMakeFiles\FortranLower.dir\FortranLower.pdb /FS -c C:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower\OpenACC.cpp
C:\BuildTools\VC\Tools\MSVC\14.29.30133\include\variant(479): fatal error C1060: compiler is out of heap space
[8100/12489] Building CXX object tools\flang\lib\Lower\CMakeFiles\FortranLower.dir\OpenMP\Utils.cpp.obj
FAILED: tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/Utils.cpp.obj 
sccache C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe  /nologo /TP -DBUILD_EXAMPLES -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\include -Itools\flang\include -Iinclude -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\mlir\include -Itools\mlir\include -Itools\clang\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\clang\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -w14062 -we4238 /Gw /O2 /Ob2  -MD  /EHs-c- /GR- -UNDEBUG -std:c++17 /showIncludes /Fotools\flang\lib\Lower\CMakeFiles\FortranLower.dir\OpenMP\Utils.cpp.obj /Fdtools\flang\lib\Lower\CMakeFiles\FortranLower.dir\FortranLower.pdb /FS -c C:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower\OpenMP\Utils.cpp
C:\BuildTools\VC\Tools\MSVC\14.29.30133\include\xutility(142): fatal error C1060: compiler is out of heap space
[8101/12489] Building CXX object tools\flang\lib\Lower\CMakeFiles\FortranLower.dir\OpenMP\DataSharingProcessor.cpp.obj
FAILED: tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/DataSharingProcessor.cpp.obj 
sccache C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe  /nologo /TP -DBUILD_EXAMPLES -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\include -Itools\flang\include -Iinclude -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\mlir\include -Itools\mlir\include -Itools\clang\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\clang\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -w14062 -we4238 /Gw /O2 /Ob2  -MD  /EHs-c- /GR- -UNDEBUG -std:c++17 /showIncludes /Fotools\flang\lib\Lower\CMakeFiles\FortranLower.dir\OpenMP\DataSharingProcessor.cpp.obj /Fdtools\flang\lib\Lower\CMakeFiles\FortranLower.dir\FortranLower.pdb /FS -c C:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower\OpenMP\DataSharingProcessor.cpp
C:\BuildTools\VC\Tools\MSVC\14.29.30133\include\variant(479): fatal error C1060: compiler is out of heap space
[8102/12489] Building CXX object tools\flang\lib\Lower\CMakeFiles\FortranLower.dir\PFTBuilder.cpp.obj
FAILED: tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/PFTBuilder.cpp.obj 
sccache C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe  /nologo /TP -DBUILD_EXAMPLES -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\include -Itools\flang\include -Iinclude -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\mlir\include -Itools\mlir\include -Itools\clang\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\clang\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -w14062 -we4238 /Gw /O2 /Ob2  -MD  /EHs-c- /GR- -UNDEBUG -std:c++17 /showIncludes /Fotools\flang\lib\Lower\CMakeFiles\FortranLower.dir\PFTBuilder.cpp.obj /Fdtools\flang\lib\Lower\CMakeFiles\FortranLower.dir\FortranLower.pdb /FS -c C:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower\PFTBuilder.cpp
C:\BuildTools\VC\Tools\MSVC\14.29.30133\include\variant(1529): fatal error C1060: compiler is out of heap space
[8103/12489] Building CXX object tools\flang\lib\Lower\CMakeFiles\FortranLower.dir\OpenMP\ClauseProcessor.cpp.obj
FAILED: tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/ClauseProcessor.cpp.obj 
sccache C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe  /nologo /TP -DBUILD_EXAMPLES -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\include -Itools\flang\include -Iinclude -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\mlir\include -Itools\mlir\include -Itools\clang\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\clang\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -w14062 -we4238 /Gw /O2 /Ob2  -MD  /EHs-c- /GR- -UNDEBUG -std:c++17 /showIncludes /Fotools\flang\lib\Lower\CMakeFiles\FortranLower.dir\OpenMP\ClauseProcessor.cpp.obj /Fdtools\flang\lib\Lower\CMakeFiles\FortranLower.dir\FortranLower.pdb /FS -c C:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower\OpenMP\ClauseProcessor.cpp
C:\BuildTools\VC\Tools\MSVC\14.29.30133\include\variant(479): fatal error C1060: compiler is out of heap space
[8104/12489] Building CXX object tools\flang\lib\Lower\CMakeFiles\FortranLower.dir\OpenMP\OpenMP.cpp.obj
FAILED: tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/OpenMP.cpp.obj 
sccache C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe  /nologo /TP -DBUILD_EXAMPLES -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\include -Itools\flang\include -Iinclude -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\mlir\include -Itools\mlir\include -Itools\clang\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\clang\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -w14062 -we4238 /Gw /O2 /Ob2  -MD  /EHs-c- /GR- -UNDEBUG -std:c++17 /showIncludes /Fotools\flang\lib\Lower\CMakeFiles\FortranLower.dir\OpenMP\OpenMP.cpp.obj /Fdtools\flang\lib\Lower\CMakeFiles\FortranLower.dir\FortranLower.pdb /FS -c C:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower\OpenMP\OpenMP.cpp
C:\BuildTools\VC\Tools\MSVC\14.29.30133\include\variant(479): fatal error C1060: compiler is out of heap space
[8105/12489] Building CXX object tools\flang\lib\Lower\CMakeFiles\FortranLower.dir\Bridge.cpp.obj
FAILED: tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/Bridge.cpp.obj 
sccache C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe  /nologo /TP -DBUILD_EXAMPLES -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\include -Itools\flang\include -Iinclude -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\mlir\include -Itools\mlir\include -Itools\clang\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\clang\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -w14062 -we4238 /Gw /O2 /Ob2  -MD  /EHs-c- /GR- -UNDEBUG -std:c++17 /showIncludes /Fotools\flang\lib\Lower\CMakeFiles\FortranLower.dir\Bridge.cpp.obj /Fdtools\flang\lib\Lower\CMakeFiles\FortranLower.dir\FortranLower.pdb /FS -c C:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower\Bridge.cpp
C:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\include\flang/Lower/Support/Utils.h(603): fatal error C1060: compiler is out of heap space
[8106/12489] Building CXX object tools\flang\lib\Lower\CMakeFiles\FortranLower.dir\IO.cpp.obj
FAILED: tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/IO.cpp.obj 
sccache C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe  /nologo /TP -DBUILD_EXAMPLES -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\include -Itools\flang\include -Iinclude -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\mlir\include -Itools\mlir\include -Itools\clang\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\clang\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -w14062 -we4238 /Gw /O2 /Ob2  -MD  /EHs-c- /GR- -UNDEBUG -std:c++17 /showIncludes /Fotools\flang\lib\Lower\CMakeFiles\FortranLower.dir\IO.cpp.obj /Fdtools\flang\lib\Lower\CMakeFiles\FortranLower.dir\FortranLower.pdb /FS -c C:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower\IO.cpp

nikic added a commit that referenced this pull request Aug 9, 2024
…96287)"

This reverts commit ccb2b01.

Causes buildbot failures, e.g. on ppc64le builders.
@nikic
Copy link
Contributor

nikic commented Aug 9, 2024

Reverted to fix the buildbot failures.

Before reapplying this, please also make sure that you fix the 1.5% regression to clang build time this causes. Presumably this is due to including <cmath> in a core header. Probably most easily tested using the DivisionByConstantInfo.cpp file.

@MDevereau
Copy link
Contributor Author

Reverted to fix the buildbot failures.

Before reapplying this, please also make sure that you fix the 1.5% regression to clang build time this causes. Presumably this is due to including <cmath> in a core header. Probably most easily tested using the DivisionByConstantInfo.cpp file.

Thanks.

shiltian pushed a commit that referenced this pull request Aug 9, 2024
Hosts which support a float size of 128 bits can benefit from constant
fp128 folding.
shiltian pushed a commit that referenced this pull request Aug 9, 2024
…96287)"

This reverts commit ccb2b01.

Causes buildbot failures, e.g. on ppc64le builders.
kutemeikito added a commit to kutemeikito/llvm-project that referenced this pull request Aug 10, 2024
* 'main' of https://github.com/llvm/llvm-project: (700 commits)
  [SandboxIR][NFC] SingleLLVMInstructionImpl class (llvm#102687)
  [ThinLTO]Clean up 'import-assume-unique-local' flag. (llvm#102424)
  [nsan] Make #include more conventional
  [SandboxIR][NFC] Use Tracker.emplaceIfTracking()
  [libc]  Moved range_reduction_double ifdef statement (llvm#102659)
  [libc] Fix CFP long double and add tests (llvm#102660)
  [TargetLowering] Handle vector types in expandFixedPointMul (llvm#102635)
  [compiler-rt][NFC] Replace environment variable with %t (llvm#102197)
  [UnitTests] Convert a test to use opaque pointers (llvm#102668)
  [CodeGen][NFCI] Don't re-implement parts of ASTContext::getIntWidth (llvm#101765)
  [SandboxIR] Clean up tracking code with the help of emplaceIfTracking() (llvm#102406)
  [mlir][bazel] remove extra blanks in mlir-tblgen test
  [NVPTX][NFC] Update tests to use bfloat type (llvm#101493)
  [mlir] Add support for parsing nested PassPipelineOptions (llvm#101118)
  [mlir][bazel] add missing td dependency in mlir-tblgen test
  [flang][cuda] Fix lib dependency
  [libc] Clean up remaining use of *_WIDTH macros in printf (llvm#102679)
  [flang][cuda] Convert cuf.alloc for box to fir.alloca in device context (llvm#102662)
  [SandboxIR] Implement the InsertElementInst class (llvm#102404)
  [libc] Fix use of cpp::numeric_limits<...>::digits (llvm#102674)
  [mlir][ODS] Verify type constraints in Types and Attributes (llvm#102326)
  [LTO] enable `ObjCARCContractPass` only on optimized build  (llvm#101114)
  [mlir][ODS] Consistent `cppType` / `cppClassName` usage (llvm#102657)
  [lldb] Move definition of SBSaveCoreOptions dtor out of header (llvm#102539)
  [libc] Use cpp::numeric_limits in preference to C23 <limits.h> macros (llvm#102665)
  [clang] Implement -fptrauth-auth-traps. (llvm#102417)
  [LLVM][rtsan] rtsan transform to preserve CFGAnalyses (llvm#102651)
  Revert "[AMDGPU] Move `AMDGPUAttributorPass` to full LTO post link stage (llvm#102086)"
  [RISCV][GISel] Add missing tests for G_CTLZ/CTTZ instruction selection. NFC
  Return available function types for BindingDecls. (llvm#102196)
  [clang] Wire -fptrauth-returns to "ptrauth-returns" fn attribute. (llvm#102416)
  [RISCV] Remove riscv-experimental-rv64-legal-i32. (llvm#102509)
  [RISCV] Move PseudoVSET(I)VLI expansion to use PseudoInstExpansion. (llvm#102496)
  [NVPTX] support switch statement with brx.idx (reland) (llvm#102550)
  [libc][newhdrgen]sorted function names in yaml (llvm#102544)
  [GlobalIsel] Combine G_ADD and G_SUB with constants (llvm#97771)
  Suppress spurious warnings due to R_RISCV_SET_ULEB128
  [scudo] Separated committed and decommitted entries. (llvm#101409)
  [MIPS] Fix missing ANDI optimization (llvm#97689)
  [Clang] Add env var for nvptx-arch/amdgpu-arch timeout (llvm#102521)
  [asan] Switch allocator to dynamic base address (llvm#98511)
  [AMDGPU] Move `AMDGPUAttributorPass` to full LTO post link stage (llvm#102086)
  [libc][math][c23] Add fadd{l,f128} C23 math functions (llvm#102531)
  [mlir][bazel] revert bazel rule change for DLTITransformOps
  [msan] Support vst{2,3,4}_lane instructions (llvm#101215)
  Revert "[MLIR][DLTI][Transform] Introduce transform.dlti.query (llvm#101561)"
  [X86] pr57673.ll - generate MIR test checks
  [mlir][vector][test] Split tests from vector-transfer-flatten.mlir (llvm#102584)
  [mlir][bazel] add bazel rule for DLTITransformOps
  OpenMPOpt: Remove dead include
  [IR] Add method to GlobalVariable to change type of initializer. (llvm#102553)
  [flang][cuda] Force default allocator in device code (llvm#102238)
  [llvm] Construct SmallVector<SDValue> with ArrayRef (NFC) (llvm#102578)
  [MLIR][DLTI][Transform] Introduce transform.dlti.query (llvm#101561)
  [AMDGPU][AsmParser][NFC] Remove a misleading comment. (llvm#102604)
  [Arm][AArch64][Clang] Respect function's branch protection attributes. (llvm#101978)
  [mlir] Verifier: steal bit to track seen instead of set. (llvm#102626)
  [Clang] Fix Handling of Init Capture with Parameter Packs in LambdaScopeForCallOperatorInstantiationRAII (llvm#100766)
  [X86] Convert truncsat clamping patterns to use SDPatternMatch. NFC.
  [gn] Give two scripts argparse.RawDescriptionHelpFormatter
  [bazel] Add missing dep for the SPIRVToLLVM target
  [Clang] Simplify specifying passes via -Xoffload-linker (llvm#102483)
  [bazel] Port for d45de80
  [SelectionDAG] Use unaligned store/load to move AVX registers onto stack for `insertelement` (llvm#82130)
  [Clang][OMPX] Add the code generation for multi-dim `num_teams` (llvm#101407)
  [ARM] Regenerate big-endian-vmov.ll. NFC
  [AMDGPU][AsmParser][NFCI] All NamedIntOperands to be of the i32 type. (llvm#102616)
  [libc][math][c23] Add totalorderl function. (llvm#102564)
  [mlir][spirv] Support `memref` in `convert-to-spirv` pass (llvm#102534)
  [MLIR][GPU-LLVM] Convert `gpu.func` to `llvm.func` (llvm#101664)
  Fix a unit test input file (llvm#102567)
  [llvm-readobj][COFF] Dump hybrid objects for ARM64X files. (llvm#102245)
  AMDGPU/NewPM: Port SIFixSGPRCopies to new pass manager (llvm#102614)
  [MemoryBuiltins] Simplify getCalledFunction() helper (NFC)
  [AArch64] Add invalid 1 x vscale costs for reductions and reduction-operations. (llvm#102105)
  [MemoryBuiltins] Handle allocator attributes on call-site
  LSV/test/AArch64: add missing lit.local.cfg; fix build (llvm#102607)
  Revert "Enable logf128 constant folding for hosts with 128bit floats (llvm#96287)"
  [RISCV] Add Syntacore SCR5 RV32/64 processors definition (llvm#102285)
  [InstCombine] Remove unnecessary RUN line from test (NFC)
  [flang][OpenMP] Handle multiple ranges in `num_teams` clause (llvm#102535)
  [mlir][vector] Add tests for scalable vectors in one-shot-bufferize.mlir (llvm#102361)
  [mlir][vector] Disable `vector.matrix_multiply` for scalable vectors (llvm#102573)
  [clang] Implement CWG2627 Bit-fields and narrowing conversions (llvm#78112)
  [NFC] Use references to avoid copying (llvm#99863)
  Revert "[mlir][ArmSME] Pattern to swap shape_cast(tranpose) with transpose(shape_cast) (llvm#100731)" (llvm#102457)
  [IRBuilder] Generate nuw GEPs for struct member accesses (llvm#99538)
  [bazel] Port for 9b06e25
  [CodeGen][NewPM] Improve start/stop pass error message CodeGenPassBuilder (llvm#102591)
  [AArch64] Implement TRBMPAM_EL1 system register (llvm#102485)
  [InstCombine] Fixing wrong select folding in vectors with undef elements (llvm#102244)
  [AArch64] Sink operands to fmuladd. (llvm#102297)
  LSV: document hang reported in llvm#37865 (llvm#102479)
  Enable logf128 constant folding for hosts with 128bit floats (llvm#96287)
  [RISCV][clang] Remove bfloat base type in non-zvfbfmin vcreate (llvm#102146)
  [RISCV][clang] Add missing `zvfbfmin` to `vget_v` intrinsic (llvm#102149)
  [mlir][vector] Add mask elimination transform (llvm#99314)
  [Clang][Interp] Fix display of syntactically-invalid note for member function calls (llvm#102170)
  [bazel] Port for 3fffa6d
  [DebugInfo][RemoveDIs] Use iterator-inserters in clang (llvm#102006)
  ...

Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 10, 2024

LLVM Buildbot has detected a new failure on builder clang-with-thin-lto-ubuntu running on as-worker-92 while building llvm at step 7 "test-stage1-compiler".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/127/builds/501

Here is the relevant piece of the build log for the reference:

Step 7 (test-stage1-compiler) failure: build (failure)
...
llvm-lit: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using ld64.lld: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/bin/ld64.lld
llvm-lit: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using wasm-ld: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/bin/wasm-ld
llvm-lit: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/utils/lit/tests/lit.cfg:111: warning: Setting a timeout per test not supported. Requires the Python psutil module but it could not be found. Try installing it via pip or via your operating system's package manager.
 Some tests will be skipped and the --timeout command line argument will not work.
llvm-lit: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using ld.lld: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/bin/ld.lld
llvm-lit: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using lld-link: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/bin/lld-link
llvm-lit: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using ld64.lld: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/bin/ld64.lld
llvm-lit: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using wasm-ld: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/bin/wasm-ld
-- Testing: 79969 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 
FAIL: LLVM :: Transforms/InstSimplify/ConstProp/logf128.ll (64225 of 79969)
******************** TEST 'LLVM :: Transforms/InstSimplify/ConstProp/logf128.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/bin/opt < /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll -passes=instsimplify -S | /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/bin/FileCheck /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll
+ /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/bin/opt -passes=instsimplify -S
+ /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/bin/FileCheck /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll:75:15: error: CHECK-NEXT: expected string not found in input
; CHECK-NEXT: ret fp128 0xL00000000000000007FFF800000000000
              ^
<stdin>:41:35: note: scanning from here
define fp128 @log_e_negative_2() {
                                  ^
<stdin>:42:2: note: possible intended match here
 ret fp128 0xL0000000000000000FFFF800000000000
 ^
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll:107:15: error: CHECK-NEXT: expected string not found in input
; CHECK-NEXT: ret fp128 0xL00000000000000007FFF800000000000
              ^
<stdin>:57:42: note: scanning from here
define fp128 @log_e_negative_infinity() {
                                         ^
<stdin>:58:2: note: possible intended match here
 ret fp128 0xL0000000000000000FFFF800000000000
 ^
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll:123:15: error: CHECK-NEXT: expected string not found in input
; CHECK-NEXT: ret <2 x fp128> <fp128 0xL00000000000000007FFF800000000000, fp128 0xL00000000000000007FFF800000000000>
              ^
<stdin>:65:48: note: scanning from here
define <2 x fp128> @log_e_negative_2_vector() {
                                               ^
<stdin>:66:2: note: possible intended match here
 ret <2 x fp128> <fp128 0xL0000000000000000FFFF800000000000, fp128 0xL0000000000000000FFFF800000000000>
 ^

Input file: <stdin>
Check file: /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 12, 2024

LLVM Buildbot has detected a new failure on builder clang-with-lto-ubuntu running on as-worker-91 while building llvm at step 7 "test-stage1-compiler".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/49/builds/302

Here is the relevant piece of the build log for the reference:

Step 7 (test-stage1-compiler) failure: build (failure)
...
llvm-lit: /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using ld64.lld: /home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/bin/ld64.lld
llvm-lit: /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using wasm-ld: /home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/bin/wasm-ld
llvm-lit: /home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/utils/lit/tests/lit.cfg:111: warning: Setting a timeout per test not supported. Requires the Python psutil module but it could not be found. Try installing it via pip or via your operating system's package manager.
 Some tests will be skipped and the --timeout command line argument will not work.
llvm-lit: /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using ld.lld: /home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/bin/ld.lld
llvm-lit: /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using lld-link: /home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/bin/lld-link
llvm-lit: /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using ld64.lld: /home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/bin/ld64.lld
llvm-lit: /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using wasm-ld: /home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/bin/wasm-ld
-- Testing: 79969 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 
FAIL: LLVM :: Transforms/InstSimplify/ConstProp/logf128.ll (64225 of 79969)
******************** TEST 'LLVM :: Transforms/InstSimplify/ConstProp/logf128.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/bin/opt < /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll -passes=instsimplify -S | /home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/bin/FileCheck /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll
+ /home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/bin/opt -passes=instsimplify -S
+ /home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/bin/FileCheck /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll
/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll:75:15: error: CHECK-NEXT: expected string not found in input
; CHECK-NEXT: ret fp128 0xL00000000000000007FFF800000000000
              ^
<stdin>:41:35: note: scanning from here
define fp128 @log_e_negative_2() {
                                  ^
<stdin>:42:2: note: possible intended match here
 ret fp128 0xL0000000000000000FFFF800000000000
 ^
/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll:107:15: error: CHECK-NEXT: expected string not found in input
; CHECK-NEXT: ret fp128 0xL00000000000000007FFF800000000000
              ^
<stdin>:57:42: note: scanning from here
define fp128 @log_e_negative_infinity() {
                                         ^
<stdin>:58:2: note: possible intended match here
 ret fp128 0xL0000000000000000FFFF800000000000
 ^
/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll:123:15: error: CHECK-NEXT: expected string not found in input
; CHECK-NEXT: ret <2 x fp128> <fp128 0xL00000000000000007FFF800000000000, fp128 0xL00000000000000007FFF800000000000>
              ^
<stdin>:65:48: note: scanning from here
define <2 x fp128> @log_e_negative_2_vector() {
                                               ^
<stdin>:66:2: note: possible intended match here
 ret <2 x fp128> <fp128 0xL0000000000000000FFFF800000000000, fp128 0xL0000000000000000FFFF800000000000>
 ^

Input file: <stdin>
Check file: /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll

MDevereau added a commit to MDevereau/llvm-project that referenced this pull request Aug 13, 2024
This is a reland of (llvm#96287). This change makes tests
in logf128.ll ignore the sign of NaNs for negative value
tests and moves an #include <cmath> to be blocked
behind #ifndef _GLIBCXX_MATH_H.
MDevereau added a commit that referenced this pull request Aug 14, 2024
This is a reland of #96287. This change makes tests in logf128.ll ignore
the sign of NaNs for negative value tests and moves an #include <cmath>
to be blocked behind #ifndef _GLIBCXX_MATH_H.
MDevereau added a commit to MDevereau/llvm-project that referenced this pull request Aug 20, 2024
This is a reland of (llvm#96287). This patch attempts to reduce
clang's compile time by removing #includes of float128.h and
inlining convertToQuad functions instead.
nikic pushed a commit to nikic/llvm-project that referenced this pull request Aug 20, 2024
This is a reland of (llvm#96287). This patch attempts to reduce
clang's compile time by removing #includes of float128.h and
inlining convertToQuad functions instead.

Use Api.extractBitsAsZExtValue

Remove stray semi-colon
MDevereau added a commit that referenced this pull request Aug 22, 2024
…04929)

This is a reland of (#96287). This patch attempts to reduce the reverted
patch's clang compile time by removing #includes of float128.h and
inlining convertToQuad functions instead.
cjdb pushed a commit to cjdb/llvm-project that referenced this pull request Aug 23, 2024
…vm#104929)

This is a reland of (llvm#96287). This patch attempts to reduce the reverted
patch's clang compile time by removing #includes of float128.h and
inlining convertToQuad functions instead.
@kraj
Copy link
Contributor

kraj commented Aug 24, 2024

@MDevereau sadly the relanded patch has caused regression while compiling gawk on aarch64, I am attaching the failing test file and script to run

PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /home/khem/llvm-project/build/bin/clang -DGAWK -DHAVE_CONFIG_H -I./.. -I. -I.. -g -O2 -DNDEBUG -DNDEBUG -g -O2 -DNDEBUG -DNDEBUG -MT pma.o -MD -MP -MF .deps/pma.Tpo -c -o pma.o pma.c
1.      <eof> parser at end of file
2.      Optimizer
3.      Running pass "require<globals-aa>,function(invalidate<aa>),require<profile-summary>,cgscc(devirt<4>(inline,function-attrs<skip-non-recursive-function-attrs>,openmp-opt-cgscc,function<eager-inv;no-rerun>(sroa<modify-cfg>,early-cse<memssa>,speculative-execution<only-if-divergent-target>,jump-threading,correlated-propagation,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,aggressive-instcombine,libcalls-shrinkwrap,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,reassociate,constraint-elimination,loop-mssa(loop-instsimplify,loop-simplifycfg,licm<no-allowspeculation>,loop-rotate<header-duplication;no-prepare-for-lto>,licm<allowspeculation>,simple-loop-unswitch<no-nontrivial;trivial>),simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop(loop-idiom,indvars,simple-loop-unswitch<no-nontrivial;trivial>,loop-idiom-vectorize,loop-deletion,loop-unroll-full),sroa<modify-cfg>,vector-combine,mldst-motion<no-split-footer-bb>,gvn<>,sccp,bdce,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,jump-threading,correlated-propagation,adce,memcpyopt,dse,move-auto-init,loop-mssa(licm<allowspeculation>),coro-elide,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>),function-attrs,function(require<should-not-run-function-passes>),coro-split)),function(invalidate<should-not-run-function-passes>),cgscc(devirt<4>())" on module "pma.c"
4.      Running pass "cgscc(devirt<4>(inline,function-attrs<skip-non-recursive-function-attrs>,openmp-opt-cgscc,function<eager-inv;no-rerun>(sroa<modify-cfg>,early-cse<memssa>,speculative-execution<only-if-divergent-target>,jump-threading,correlated-propagation,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,aggressive-instcombine,libcalls-shrinkwrap,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,reassociate,constraint-elimination,loop-mssa(loop-instsimplify,loop-simplifycfg,licm<no-allowspeculation>,loop-rotate<header-duplication;no-prepare-for-lto>,licm<allowspeculation>,simple-loop-unswitch<no-nontrivial;trivial>),simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop(loop-idiom,indvars,simple-loop-unswitch<no-nontrivial;trivial>,loop-idiom-vectorize,loop-deletion,loop-unroll-full),sroa<modify-cfg>,vector-combine,mldst-motion<no-split-footer-bb>,gvn<>,sccp,bdce,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,jump-threading,correlated-propagation,adce,memcpyopt,dse,move-auto-init,loop-mssa(licm<allowspeculation>),coro-elide,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>),function-attrs,function(require<should-not-run-function-passes>),coro-split))" on module "pma.c"
 #0 0x0000c71975749f44 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/khem/llvm-project/build/bin/clang+0x35d9f44)
 #1 0x0000c71975748450 llvm::sys::CleanupOnSignal(unsigned long) (/home/khem/llvm-project/build/bin/clang+0x35d8450)
 #2 0x0000c7197569cf18 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x0000e517c22828f8 (linux-vdso.so.1+0x8f8)
 #4 0x0000c7197487d08c (anonymous namespace)::ConstantFoldScalarCall1(llvm::StringRef, unsigned int, llvm::Type*, llvm::ArrayRef<llvm::Constant*>, llvm::TargetLibraryInfo const*, llvm::CallBase const*) (.isra.0) ConstantFolding.cpp:0:0
 #5 0x0000c719748d19ec (anonymous namespace)::CallAnalyzer::visitCallBase(llvm::CallBase&) InlineCost.cpp:0:0
 #6 0x0000c719748d40f4 (anonymous namespace)::CallAnalyzer::analyze() (.part.0) InlineCost.cpp:0:0
 #7 0x0000c719748d5acc llvm::getInlineCost(llvm::CallBase&, llvm::Function*, llvm::InlineParams const&, llvm::TargetTransformInfo&, llvm::function_ref<llvm::AssumptionCache& (llvm::Function&)>, llvm::function_ref<llvm::TargetLibraryInfo const& (llvm::Function&)>, llvm::function_ref<llvm::BlockFrequencyInfo& (llvm::Function&)>, llvm::ProfileSummaryInfo*, llvm::OptimizationRemarkEmitter*) (/home/khem/llvm-project/build/bin/clang+0x2765acc)
 #8 0x0000c719748d5e70 llvm::getInlineCost(llvm::CallBase&, llvm::InlineParams const&, llvm::TargetTransformInfo&, llvm::function_ref<llvm::AssumptionCache& (llvm::Function&)>, llvm::function_ref<llvm::TargetLibraryInfo const& (llvm::Function&)>, llvm::function_ref<llvm::BlockFrequencyInfo& (llvm::Function&)>, llvm::ProfileSummaryInfo*, llvm::OptimizationRemarkEmitter*) (/home/khem/llvm-project/build/bin/clang+0x2765e70)
 #9 0x0000c71978ece8e4 llvm::InlineCost llvm::function_ref<llvm::InlineCost (llvm::CallBase&)>::callback_fn<getDefaultInlineAdvice(llvm::CallBase&, llvm::AnalysisManager<llvm::Function>&, llvm::InlineParams const&)::'lambda2'(llvm::CallBase&)>(long, llvm::CallBase&) InlineAdvisor.cpp:0:0
#10 0x0000c71978ed38e0 llvm::shouldInline(llvm::CallBase&, llvm::function_ref<llvm::InlineCost (llvm::CallBase&)>, llvm::OptimizationRemarkEmitter&, bool) (/home/khem/llvm-project/build/bin/clang+0x6d638e0)
#11 0x0000c71978ed48f0 getDefaultInlineAdvice(llvm::CallBase&, llvm::AnalysisManager<llvm::Function>&, llvm::InlineParams const&) InlineAdvisor.cpp:0:0
#12 0x0000c71978ed4998 llvm::DefaultInlineAdvisor::getAdviceImpl(llvm::CallBase&) (/home/khem/llvm-project/build/bin/clang+0x6d64998)
#13 0x0000c71978ed1650 llvm::InlineAdvisor::getAdvice(llvm::CallBase&, bool) (/home/khem/llvm-project/build/bin/clang+0x6d61650)
#14 0x0000c71976a09bcc llvm::InlinerPass::run(llvm::LazyCallGraph::SCC&, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&) (/home/khem/llvm-project/build/bin/clang+0x4899bcc)
#15 0x0000c71976861fdc llvm::detail::PassModel<llvm::LazyCallGraph::SCC, llvm::InlinerPass, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&>::run(llvm::LazyCallGraph::SCC&, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&) (/home/khem/llvm-project/build/bin/clang+0x46f1fdc)
#16 0x0000c71974861424 llvm::PassManager<llvm::LazyCallGraph::SCC, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&>::run(llvm::LazyCallGraph::SCC&, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&) (/home/khem/llvm-project/build/bin/clang+0x26f1424)
#17 0x0000c7197685dd5c llvm::detail::PassModel<llvm::LazyCallGraph::SCC, llvm::PassManager<llvm::LazyCallGraph::SCC, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&>, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&>::run(llvm::LazyCallGraph::SCC&, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&) (/home/khem/llvm-project/build/bin/clang+0x46edd5c)
#18 0x0000c71974867580 llvm::DevirtSCCRepeatedPass::run(llvm::LazyCallGraph::SCC&, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&) (/home/khem/llvm-project/build/bin/clang+0x26f7580)
#19 0x0000c7197685ddbc llvm::detail::PassModel<llvm::LazyCallGraph::SCC, llvm::DevirtSCCRepeatedPass, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&>::run(llvm::LazyCallGraph::SCC&, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&) (/home/khem/llvm-project/build/bin/clang+0x46eddbc)
#20 0x0000c7197486323c llvm::ModuleToPostOrderCGSCCPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/khem/llvm-project/build/bin/clang+0x26f323c)
#21 0x0000c7197685dcfc llvm::detail::PassModel<llvm::Module, llvm::ModuleToPostOrderCGSCCPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/khem/llvm-project/build/bin/clang+0x46edcfc)
#22 0x0000c719751a4b7c llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/khem/llvm-project/build/bin/clang+0x3034b7c)
#23 0x0000c71976a084e8 llvm::ModuleInlinerWrapperPass::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/khem/llvm-project/build/bin/clang+0x48984e8)
#24 0x0000c7197685d24c llvm::detail::PassModel<llvm::Module, llvm::ModuleInlinerWrapperPass, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/khem/llvm-project/build/bin/clang+0x46ed24c)
#25 0x0000c719751a4b7c llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/khem/llvm-project/build/bin/clang+0x3034b7c)
#26 0x0000c719759911c0 (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>&, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>&, clang::BackendConsumer*) BackendUtil.cpp:0:0
#27 0x0000c719759939e0 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/home/khem/llvm-project/build/bin/clang+0x38239e0)
#28 0x0000c71975ee4484 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/khem/llvm-project/build/bin/clang+0x3d74484)
#29 0x0000c7197764076c clang::ParseAST(clang::Sema&, bool, bool) (/home/khem/llvm-project/build/bin/clang+0x54d076c)
#30 0x0000c71976136ca0 clang::FrontendAction::Execute() (/home/khem/llvm-project/build/bin/clang+0x3fc6ca0)
#31 0x0000c719760c40f0 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/khem/llvm-project/build/bin/clang+0x3f540f0)
#32 0x0000c719761eed10 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/khem/llvm-project/build/bin/clang+0x407ed10)
#33 0x0000c7197301b9c0 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/khem/llvm-project/build/bin/clang+0xeab9c0)
#34 0x0000c71973015afc ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#35 0x0000c71975f26260 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) Job.cpp:0:0
#36 0x0000c7197569d3c4 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/home/khem/llvm-project/build/bin/clang+0x352d3c4)
#37 0x0000c71975f265ec clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (.part.0) Job.cpp:0:0
#38 0x0000c71975ef340c clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/home/khem/llvm-project/build/bin/clang+0x3d8340c)
#39 0x0000c71975ef3c34 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/home/khem/llvm-project/build/bin/clang+0x3d83c34)
#40 0x0000c71975f03724 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/home/khem/llvm-project/build/bin/clang+0x3d93724)
#41 0x0000c719730189d4 clang_main(int, char**, llvm::ToolContext const&) (/home/khem/llvm-project/build/bin/clang+0xea89d4)
#42 0x0000c71972f43adc main (/home/khem/llvm-project/build/bin/clang+0xdd3adc)
#43 0x0000e517c1c773fc (/lib/aarch64-linux-gnu/libc.so.6+0x273fc)
#44 0x0000e517c1c774cc __libc_start_main (/lib/aarch64-linux-gnu/libc.so.6+0x274cc)
#45 0x0000c719730155b0 _start (/home/khem/llvm-project/build/bin/clang+0xea55b0)
clang: error: clang frontend command failed with exit code 139 (use -v to see invocation)
clang version 20.0.0git (git@github.com:kraj/llvm-project f67388232384682fb442d6e5501d9259c41fd714)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/khem/llvm-project/build/bin

pma.zip

@davemgreen
Copy link
Collaborator

Thanks for the report. It looks like there is an unguarded use of TLI that might have been nullptr from certain passes. I've added 83a5c7c that hopefully addresses it.

@kraj
Copy link
Contributor

kraj commented Aug 24, 2024

Thanks for the report. It looks like there is an unguarded use of TLI that might have been nullptr from certain passes. I've added 83a5c7c that hopefully addresses it.

thats for quick turn around. this patch fixed the problem

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 12, 2024

LLVM Buildbot has detected a new failure on builder clang-m68k-linux-cross running on suse-gary-m68k-cross while building llvm at step 5 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/27/builds/215

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'LLVM :: Transforms/InstSimplify/ConstProp/logf128.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /srv/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/bin/opt < /srv/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll -passes=instsimplify -S | /srv/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/bin/FileCheck /srv/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll
+ /srv/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/bin/FileCheck /srv/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll
+ /srv/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/bin/opt -passes=instsimplify -S
/srv/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll:75:15: error: CHECK-NEXT: expected string not found in input
; CHECK-NEXT: ret fp128 0xL00000000000000007FFF800000000000
              ^
<stdin>:41:35: note: scanning from here
define fp128 @log_e_negative_2() {
                                  ^
<stdin>:42:2: note: possible intended match here
 ret fp128 0xL0000000000000000FFFF800000000000
 ^
/srv/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll:107:15: error: CHECK-NEXT: expected string not found in input
; CHECK-NEXT: ret fp128 0xL00000000000000007FFF800000000000
              ^
<stdin>:57:42: note: scanning from here
define fp128 @log_e_negative_infinity() {
                                         ^
<stdin>:58:2: note: possible intended match here
 ret fp128 0xL0000000000000000FFFF800000000000
 ^
/srv/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll:123:15: error: CHECK-NEXT: expected string not found in input
; CHECK-NEXT: ret <2 x fp128> <fp128 0xL00000000000000007FFF800000000000, fp128 0xL00000000000000007FFF800000000000>
              ^
<stdin>:65:48: note: scanning from here
define <2 x fp128> @log_e_negative_2_vector() {
                                               ^
<stdin>:66:2: note: possible intended match here
 ret <2 x fp128> <fp128 0xL0000000000000000FFFF800000000000, fp128 0xL0000000000000000FFFF800000000000>
 ^

Input file: <stdin>
Check file: /srv/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            .
            .
            .
           36:  
           37: define fp128 @log_e_smallest_number_larger_than_one() { 
           38:  ret fp128 0xL00000000000000003F8F000000000000 
           39: } 
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 24, 2025

LLVM Buildbot has detected a new failure on builder openmp-offload-amdgpu-runtime-2 running on rocm-worker-hw-02 while building llvm at step 8 "Add check check-llvm".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/33

Here is the relevant piece of the build log for the reference
Step 8 (Add check check-llvm) failure: test (failure)
******************** TEST 'LLVM :: Transforms/InstSimplify/ConstProp/logf128.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/opt < /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll -passes=instsimplify -S | /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/FileCheck /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/opt -passes=instsimplify -S
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/FileCheck /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll:75:15: error: CHECK-NEXT: expected string not found in input
; CHECK-NEXT: ret fp128 0xL00000000000000007FFF800000000000
              ^
<stdin>:41:35: note: scanning from here
define fp128 @log_e_negative_2() {
                                  ^
<stdin>:42:2: note: possible intended match here
 ret fp128 0xL0000000000000000FFFF800000000000
 ^
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll:107:15: error: CHECK-NEXT: expected string not found in input
; CHECK-NEXT: ret fp128 0xL00000000000000007FFF800000000000
              ^
<stdin>:57:42: note: scanning from here
define fp128 @log_e_negative_infinity() {
                                         ^
<stdin>:58:2: note: possible intended match here
 ret fp128 0xL0000000000000000FFFF800000000000
 ^
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll:123:15: error: CHECK-NEXT: expected string not found in input
; CHECK-NEXT: ret <2 x fp128> <fp128 0xL00000000000000007FFF800000000000, fp128 0xL00000000000000007FFF800000000000>
              ^
<stdin>:65:48: note: scanning from here
define <2 x fp128> @log_e_negative_2_vector() {
                                               ^
<stdin>:66:2: note: possible intended match here
 ret <2 x fp128> <fp128 0xL0000000000000000FFFF800000000000, fp128 0xL0000000000000000FFFF800000000000>
 ^

Input file: <stdin>
Check file: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/Transforms/InstSimplify/ConstProp/logf128.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            .
            .
            .
           36:  
           37: define fp128 @log_e_smallest_number_larger_than_one() { 
           38:  ret fp128 0xL00000000000000003F8F000000000000 
           39: } 
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmake Build system in general and CMake in particular llvm:adt llvm:analysis llvm:support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants