[llvm] [InstCombine] Transform high latency, dependent FSQRT/FDIV into FMUL (PR #87474)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 16 22:58:09 PST 2025


llvm-ci wrote:

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

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

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

```
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/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: 88353 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.
FAIL: LLVM :: Transforms/InstCombine/fsqrtdiv-transform.ll (67670 of 88353)
******************** TEST 'LLVM :: Transforms/InstCombine/fsqrtdiv-transform.ll' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 2: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/opt -S -passes='instcombine<no-verify-fixpoint>' < /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/test/Transforms/InstCombine/fsqrtdiv-transform.ll | /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/FileCheck /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/test/Transforms/InstCombine/fsqrtdiv-transform.ll
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/opt -S '-passes=instcombine<no-verify-fixpoint>'
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/FileCheck /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/test/Transforms/InstCombine/fsqrtdiv-transform.ll
=================================================================
==3306665==ERROR: AddressSanitizer: heap-use-after-free on address 0x7779f1024590 at pc 0x588832b9e098 bp 0x7ffccfc43b60 sp 0x7ffccfc43b58
READ of size 1 at 0x7779f1024590 thread T0
    #0 0x588832b9e097 in getValueID /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/IR/Value.h:533:12
    #1 0x588832b9e097 in doit /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/IR/Value.h:1007:16
    #2 0x588832b9e097 in doit /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/Casting.h:110:12
    #3 0x588832b9e097 in doit /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/Casting.h:137:12
    #4 0x588832b9e097 in doit /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/Casting.h:127:12
    #5 0x588832b9e097 in isPossible /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/Casting.h:255:12
    #6 0x588832b9e097 in doCastIfPossible /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/Casting.h:493:10
    #7 0x588832b9e097 in dyn_cast<llvm::Instruction, const llvm::Value> /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/Casting.h:663:10
    #8 0x588832b9e097 in classof /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/IR/Operator.h:356:19
    #9 0x588832b9e097 in doit /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/Casting.h:64:53
    #10 0x588832b9e097 in doit /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/Casting.h:110:12
    #11 0x588832b9e097 in doit /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/Casting.h:137:12
    #12 0x588832b9e097 in doit /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/Casting.h:127:12
    #13 0x588832b9e097 in isPossible /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/Casting.h:255:12
    #14 0x588832b9e097 in isPossible /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/Casting.h:509:12
    #15 0x588832b9e097 in isa<llvm::FPMathOperator, const llvm::Instruction *> /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/Casting.h:549:10
    #16 0x588832b9e097 in llvm::Instruction::hasAllowReassoc() const /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/lib/IR/Instruction.cpp:603:3
    #17 0x588834d18c63 in llvm::InstCombinerImpl::visitFDiv(llvm::BinaryOperator&) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp:2126:9
    #18 0x588834b983da in llvm::InstCombinerImpl::run() /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:5234:31
    #19 0x588834ba0f6b in combineInstructionsOverFunction(llvm::Function&, llvm::InstructionWorklist&, llvm::AAResults*, llvm::AssumptionCache&, llvm::TargetLibraryInfo&, llvm::TargetTransformInfo&, llvm::DominatorTree&, llvm::OptimizationRemarkEmitter&, llvm::BlockFrequencyInfo*, llvm::BranchProbabilityInfo*, llvm::ProfileSummaryInfo*, llvm::InstCombineOptions const&) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:5551:37
    #20 0x588834b9f0eb in llvm::InstCombinePass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:5614:8
    #21 0x58883607b721 in llvm::detail::PassModel<llvm::Function, llvm::InstCombinePass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/IR/PassManagerInternal.h:90:17
    #22 0x588832ea61c3 in llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/IR/PassManagerImpl.h:81:38
    #23 0x58883608a701 in llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/IR/PassManagerInternal.h:90:17
    #24 0x588832eb4096 in llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/lib/IR/PassManager.cpp:124:38
    #25 0x58883607a091 in llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/IR/PassManagerInternal.h:90:17
    #26 0x588832ea2fe3 in llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/IR/PassManagerImpl.h:81:38
Step 11 (stage2/asan check) failure: stage2/asan check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/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: 88353 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.
FAIL: LLVM :: Transforms/InstCombine/fsqrtdiv-transform.ll (67670 of 88353)
******************** TEST 'LLVM :: Transforms/InstCombine/fsqrtdiv-transform.ll' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 2: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/opt -S -passes='instcombine<no-verify-fixpoint>' < /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/test/Transforms/InstCombine/fsqrtdiv-transform.ll | /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/FileCheck /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/test/Transforms/InstCombine/fsqrtdiv-transform.ll
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/opt -S '-passes=instcombine<no-verify-fixpoint>'
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/FileCheck /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/test/Transforms/InstCombine/fsqrtdiv-transform.ll
=================================================================
==3306665==ERROR: AddressSanitizer: heap-use-after-free on address 0x7779f1024590 at pc 0x588832b9e098 bp 0x7ffccfc43b60 sp 0x7ffccfc43b58
READ of size 1 at 0x7779f1024590 thread T0
    #0 0x588832b9e097 in getValueID /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/IR/Value.h:533:12
    #1 0x588832b9e097 in doit /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/IR/Value.h:1007:16
    #2 0x588832b9e097 in doit /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/Casting.h:110:12
    #3 0x588832b9e097 in doit /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/Casting.h:137:12
    #4 0x588832b9e097 in doit /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/Casting.h:127:12
    #5 0x588832b9e097 in isPossible /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/Casting.h:255:12
    #6 0x588832b9e097 in doCastIfPossible /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/Casting.h:493:10
    #7 0x588832b9e097 in dyn_cast<llvm::Instruction, const llvm::Value> /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/Casting.h:663:10
    #8 0x588832b9e097 in classof /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/IR/Operator.h:356:19
    #9 0x588832b9e097 in doit /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/Casting.h:64:53
    #10 0x588832b9e097 in doit /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/Casting.h:110:12
    #11 0x588832b9e097 in doit /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/Casting.h:137:12
    #12 0x588832b9e097 in doit /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/Casting.h:127:12
    #13 0x588832b9e097 in isPossible /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/Casting.h:255:12
    #14 0x588832b9e097 in isPossible /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/Casting.h:509:12
    #15 0x588832b9e097 in isa<llvm::FPMathOperator, const llvm::Instruction *> /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/Casting.h:549:10
    #16 0x588832b9e097 in llvm::Instruction::hasAllowReassoc() const /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/lib/IR/Instruction.cpp:603:3
    #17 0x588834d18c63 in llvm::InstCombinerImpl::visitFDiv(llvm::BinaryOperator&) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp:2126:9
    #18 0x588834b983da in llvm::InstCombinerImpl::run() /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:5234:31
    #19 0x588834ba0f6b in combineInstructionsOverFunction(llvm::Function&, llvm::InstructionWorklist&, llvm::AAResults*, llvm::AssumptionCache&, llvm::TargetLibraryInfo&, llvm::TargetTransformInfo&, llvm::DominatorTree&, llvm::OptimizationRemarkEmitter&, llvm::BlockFrequencyInfo*, llvm::BranchProbabilityInfo*, llvm::ProfileSummaryInfo*, llvm::InstCombineOptions const&) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:5551:37
    #20 0x588834b9f0eb in llvm::InstCombinePass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:5614:8
    #21 0x58883607b721 in llvm::detail::PassModel<llvm::Function, llvm::InstCombinePass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/IR/PassManagerInternal.h:90:17
    #22 0x588832ea61c3 in llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/IR/PassManagerImpl.h:81:38
    #23 0x58883608a701 in llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/IR/PassManagerInternal.h:90:17
    #24 0x588832eb4096 in llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/lib/IR/PassManager.cpp:124:38
    #25 0x58883607a091 in llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/IR/PassManagerInternal.h:90:17
    #26 0x588832ea2fe3 in llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/IR/PassManagerImpl.h:81:38

```

</details>

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


More information about the llvm-commits mailing list