[llvm] [Analysis] Ensure use of strict fp exceptions in ConstantFolding (PR #136139)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 28 05:46:01 PDT 2025


llvm-ci wrote:

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

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

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 6 (build-stage1-compiler) failure: build (failure)
...
143.648 [5195/72/1289] Building CXX object lib/Transforms/Vectorize/CMakeFiles/LLVMVectorize.dir/SandboxVectorizer/Passes/SeedCollection.cpp.o
143.750 [5194/72/1290] Building CXX object lib/Transforms/Vectorize/CMakeFiles/LLVMVectorize.dir/SandboxVectorizer/SandboxVectorizerPassBuilder.cpp.o
In file included from /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Passes/BottomUpVec.h:21,
                 from /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/lib/Transforms/Vectorize/SandboxVectorizer/SandboxVectorizerPassBuilder.cpp:3:
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Legality.h:185:33: warning: ‘maybe_unused’ attribute ignored [-Wattributes]
  185 |   [[maybe_unused]] ResultReason Reason;
      |                                 ^~~~~~
144.138 [5193/72/1291] Building CXX object lib/Transforms/ObjCARC/CMakeFiles/LLVMObjCARCOpts.dir/ObjCARCContract.cpp.o
144.191 [5192/72/1292] Building CXX object lib/Analysis/CMakeFiles/LLVMAnalysis.dir/Analysis.cpp.o
144.231 [5191/72/1293] Building CXX object lib/Analysis/CMakeFiles/LLVMAnalysis.dir/ConstantFolding.cpp.o
FAILED: lib/Analysis/CMakeFiles/LLVMAnalysis.dir/ConstantFolding.cpp.o 
/usr/bin/c++ -DGTEST_HAS_RTTI=0 -DHAS_LOGF128 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/lib/Analysis -I/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/lib/Analysis -I/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/include -I/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -std=c++17 -ffp-exception-behavior=strict -MD -MT lib/Analysis/CMakeFiles/LLVMAnalysis.dir/ConstantFolding.cpp.o -MF lib/Analysis/CMakeFiles/LLVMAnalysis.dir/ConstantFolding.cpp.o.d -o lib/Analysis/CMakeFiles/LLVMAnalysis.dir/ConstantFolding.cpp.o -c /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/lib/Analysis/ConstantFolding.cpp
c++: error: unrecognized command-line option ‘-ffp-exception-behavior=strict’
145.105 [5191/71/1294] Building CXX object lib/Transforms/Vectorize/CMakeFiles/LLVMVectorize.dir/LoopIdiomVectorize.cpp.o
145.125 [5191/70/1295] Building CXX object lib/Transforms/Vectorize/CMakeFiles/LLVMVectorize.dir/VPlanUtils.cpp.o
In file included from /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/lib/Transforms/Vectorize/VPlanUtils.cpp:10:
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h: In instantiation of ‘bool llvm::VPlanPatternMatch::Recipe_match<Ops_t, Opcode, Commutative, RecipeTys>::all_of_tuple_elements(std::index_sequence<Idx ...>, Fn) const [with Fn = llvm::VPlanPatternMatch::Recipe_match<std::tuple<>, 0, false, llvm::VPCanonicalIVPHIRecipe>::match(const llvm::VPRecipeBase*) const::<lambda(auto:25, unsigned int)>; long unsigned int ...Is = {}; Ops_t = std::tuple<>; unsigned int Opcode = 0; bool Commutative = false; RecipeTys = {llvm::VPCanonicalIVPHIRecipe}; std::index_sequence<Idx ...> = std::integer_sequence<long unsigned int>]’:
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:229:30:   required from ‘bool llvm::VPlanPatternMatch::Recipe_match<Ops_t, Opcode, Commutative, RecipeTys>::match(const llvm::VPRecipeBase*) const [with Ops_t = std::tuple<>; unsigned int Opcode = 0; bool Commutative = false; RecipeTys = {llvm::VPCanonicalIVPHIRecipe}]’
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:213:25:   required from ‘bool llvm::VPlanPatternMatch::Recipe_match<Ops_t, Opcode, Commutative, RecipeTys>::match(const llvm::VPValue*) const [with Ops_t = std::tuple<>; unsigned int Opcode = 0; bool Commutative = false; RecipeTys = {llvm::VPCanonicalIVPHIRecipe}]’
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:230:45:   required from ‘llvm::VPlanPatternMatch::Recipe_match<std::tuple<llvm::VPlanPatternMatch::Recipe_match<std::tuple<>, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::int_pred_ty<llvm::VPlanPatternMatch::is_specific_int, 0> >, 0, false, llvm::VPScalarIVStepsRecipe>::match(const llvm::VPRecipeBase*) const::<lambda(auto:25, unsigned int)> [with auto:25 = llvm::VPlanPatternMatch::Recipe_match<std::tuple<>, 0, false, llvm::VPCanonicalIVPHIRecipe>]’
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:259:14:   required from ‘bool llvm::VPlanPatternMatch::Recipe_match<Ops_t, Opcode, Commutative, RecipeTys>::all_of_tuple_elements(std::index_sequence<Idx ...>, Fn) const [with Fn = llvm::VPlanPatternMatch::Recipe_match<std::tuple<llvm::VPlanPatternMatch::Recipe_match<std::tuple<>, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::int_pred_ty<llvm::VPlanPatternMatch::is_specific_int, 0> >, 0, false, llvm::VPScalarIVStepsRecipe>::match(const llvm::VPRecipeBase*) const::<lambda(auto:25, unsigned int)>; long unsigned int ...Is = {0, 1}; Ops_t = std::tuple<llvm::VPlanPatternMatch::Recipe_match<std::tuple<>, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::int_pred_ty<llvm::VPlanPatternMatch::is_specific_int, 0> >; unsigned int Opcode = 0; bool Commutative = false; RecipeTys = {llvm::VPScalarIVStepsRecipe}; std::index_sequence<Idx ...> = std::integer_sequence<long unsigned int, 0, 1>]’
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:229:30:   required from ‘bool llvm::VPlanPatternMatch::Recipe_match<Ops_t, Opcode, Commutative, RecipeTys>::match(const llvm::VPRecipeBase*) const [with Ops_t = std::tuple<llvm::VPlanPatternMatch::Recipe_match<std::tuple<>, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::int_pred_ty<llvm::VPlanPatternMatch::is_specific_int, 0> >; unsigned int Opcode = 0; bool Commutative = false; RecipeTys = {llvm::VPScalarIVStepsRecipe}]’
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:213:25:   required from ‘bool llvm::VPlanPatternMatch::Recipe_match<Ops_t, Opcode, Commutative, RecipeTys>::match(const llvm::VPValue*) const [with Ops_t = std::tuple<llvm::VPlanPatternMatch::Recipe_match<std::tuple<>, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::int_pred_ty<llvm::VPlanPatternMatch::is_specific_int, 0> >; unsigned int Opcode = 0; bool Commutative = false; RecipeTys = {llvm::VPScalarIVStepsRecipe}]’
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:29:17:   required from ‘bool llvm::VPlanPatternMatch::match(Val*, const Pattern&) [with Val = llvm::VPValue; Pattern = llvm::VPlanPatternMatch::Recipe_match<std::tuple<llvm::VPlanPatternMatch::Recipe_match<std::tuple<>, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::int_pred_ty<llvm::VPlanPatternMatch::is_specific_int, 0> >, 0, false, llvm::VPScalarIVStepsRecipe>]’
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/lib/Transforms/Vectorize/VPlanUtils.cpp:65:18:   required from here
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:258:61: warning: parameter ‘P’ set but not used [-Wunused-but-set-parameter]
  258 |   bool all_of_tuple_elements(std::index_sequence<Is...>, Fn P) const {
      |                                                          ~~~^
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h: In instantiation of ‘bool llvm::VPlanPatternMatch::Recipe_match<Ops_t, Opcode, Commutative, RecipeTys>::all_of_tuple_elements(std::index_sequence<Idx ...>, Fn) const [with Fn = llvm::VPlanPatternMatch::Recipe_match<std::tuple<>, 0, false, llvm::VPCanonicalIVPHIRecipe>::match(const llvm::VPRecipeBase*) const::<lambda(auto:26, unsigned int)>; long unsigned int ...Is = {}; Ops_t = std::tuple<>; unsigned int Opcode = 0; bool Commutative = false; RecipeTys = {llvm::VPCanonicalIVPHIRecipe}; std::index_sequence<Idx ...> = std::integer_sequence<long unsigned int>]’:
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:235:33:   required from ‘bool llvm::VPlanPatternMatch::Recipe_match<Ops_t, Opcode, Commutative, RecipeTys>::match(const llvm::VPRecipeBase*) const [with Ops_t = std::tuple<>; unsigned int Opcode = 0; bool Commutative = false; RecipeTys = {llvm::VPCanonicalIVPHIRecipe}]’
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:213:25:   required from ‘bool llvm::VPlanPatternMatch::Recipe_match<Ops_t, Opcode, Commutative, RecipeTys>::match(const llvm::VPValue*) const [with Ops_t = std::tuple<>; unsigned int Opcode = 0; bool Commutative = false; RecipeTys = {llvm::VPCanonicalIVPHIRecipe}]’
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:230:45:   required from ‘llvm::VPlanPatternMatch::Recipe_match<std::tuple<llvm::VPlanPatternMatch::Recipe_match<std::tuple<>, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::int_pred_ty<llvm::VPlanPatternMatch::is_specific_int, 0> >, 0, false, llvm::VPScalarIVStepsRecipe>::match(const llvm::VPRecipeBase*) const::<lambda(auto:25, unsigned int)> [with auto:25 = llvm::VPlanPatternMatch::Recipe_match<std::tuple<>, 0, false, llvm::VPCanonicalIVPHIRecipe>]’
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:259:14:   required from ‘bool llvm::VPlanPatternMatch::Recipe_match<Ops_t, Opcode, Commutative, RecipeTys>::all_of_tuple_elements(std::index_sequence<Idx ...>, Fn) const [with Fn = llvm::VPlanPatternMatch::Recipe_match<std::tuple<llvm::VPlanPatternMatch::Recipe_match<std::tuple<>, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::int_pred_ty<llvm::VPlanPatternMatch::is_specific_int, 0> >, 0, false, llvm::VPScalarIVStepsRecipe>::match(const llvm::VPRecipeBase*) const::<lambda(auto:25, unsigned int)>; long unsigned int ...Is = {0, 1}; Ops_t = std::tuple<llvm::VPlanPatternMatch::Recipe_match<std::tuple<>, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::int_pred_ty<llvm::VPlanPatternMatch::is_specific_int, 0> >; unsigned int Opcode = 0; bool Commutative = false; RecipeTys = {llvm::VPScalarIVStepsRecipe}; std::index_sequence<Idx ...> = std::integer_sequence<long unsigned int, 0, 1>]’
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:229:30:   required from ‘bool llvm::VPlanPatternMatch::Recipe_match<Ops_t, Opcode, Commutative, RecipeTys>::match(const llvm::VPRecipeBase*) const [with Ops_t = std::tuple<llvm::VPlanPatternMatch::Recipe_match<std::tuple<>, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::int_pred_ty<llvm::VPlanPatternMatch::is_specific_int, 0> >; unsigned int Opcode = 0; bool Commutative = false; RecipeTys = {llvm::VPScalarIVStepsRecipe}]’
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:213:25:   required from ‘bool llvm::VPlanPatternMatch::Recipe_match<Ops_t, Opcode, Commutative, RecipeTys>::match(const llvm::VPValue*) const [with Ops_t = std::tuple<llvm::VPlanPatternMatch::Recipe_match<std::tuple<>, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::int_pred_ty<llvm::VPlanPatternMatch::is_specific_int, 0> >; unsigned int Opcode = 0; bool Commutative = false; RecipeTys = {llvm::VPScalarIVStepsRecipe}]’
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:29:17:   required from ‘bool llvm::VPlanPatternMatch::match(Val*, const Pattern&) [with Val = llvm::VPValue; Pattern = llvm::VPlanPatternMatch::Recipe_match<std::tuple<llvm::VPlanPatternMatch::Recipe_match<std::tuple<>, 0, false, llvm::VPCanonicalIVPHIRecipe>, llvm::VPlanPatternMatch::int_pred_ty<llvm::VPlanPatternMatch::is_specific_int, 0> >, 0, false, llvm::VPScalarIVStepsRecipe>]’
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/lib/Transforms/Vectorize/VPlanUtils.cpp:65:18:   required from here
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h:258:61: warning: parameter ‘P’ set but not used [-Wunused-but-set-parameter]
145.230 [5191/69/1296] Building CXX object lib/Transforms/CFGuard/CMakeFiles/LLVMCFGuard.dir/CFGuard.cpp.o
145.338 [5191/68/1297] Building CXX object lib/Transforms/HipStdPar/CMakeFiles/LLVMHipStdPar.dir/HipStdPar.cpp.o
145.373 [5191/67/1298] Building CXX object lib/Transforms/Vectorize/CMakeFiles/LLVMVectorize.dir/SandboxVectorizer/Passes/BottomUpVec.cpp.o
In file included from /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Passes/BottomUpVec.h:21,
                 from /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/BottomUpVec.cpp:9:
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Legality.h:185:33: warning: ‘maybe_unused’ attribute ignored [-Wattributes]
  185 |   [[maybe_unused]] ResultReason Reason;
      |                                 ^~~~~~
145.525 [5191/66/1299] Building CXX object lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/ThinLTOBitcodeWriter.cpp.o
145.550 [5191/65/1300] Building CXX object lib/Transforms/Vectorize/CMakeFiles/LLVMVectorize.dir/SandboxVectorizer/SeedCollector.cpp.o
145.569 [5191/64/1301] Building CXX object lib/Transforms/Coroutines/CMakeFiles/LLVMCoroutines.dir/CoroConditionalWrapper.cpp.o

```

</details>

https://github.com/llvm/llvm-project/pull/136139


More information about the llvm-commits mailing list