[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:39:30 PST 2025


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-darwin` running on `doug-worker-3` while building `llvm` at step 6 "test-build-unified-tree-check-all".

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

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

```
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: Transforms/InstCombine/fsqrtdiv-transform.ll' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 2: /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/opt -S -passes='instcombine<no-verify-fixpoint>' < /Volumes/RAMDisk/buildbot-root/x86_64-darwin/llvm-project/llvm/test/Transforms/InstCombine/fsqrtdiv-transform.ll | /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/FileCheck /Volumes/RAMDisk/buildbot-root/x86_64-darwin/llvm-project/llvm/test/Transforms/InstCombine/fsqrtdiv-transform.ll
+ /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/opt -S '-passes=instcombine<no-verify-fixpoint>'
+ /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/FileCheck /Volumes/RAMDisk/buildbot-root/x86_64-darwin/llvm-project/llvm/test/Transforms/InstCombine/fsqrtdiv-transform.ll
Assertion failed: (isa<FPMathOperator>(this) && "getting fast-math flag on invalid op"), function hasAllowReassoc, file Instruction.cpp, line 603.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/opt -S -passes=instcombine<no-verify-fixpoint>
1.	Running pass "function(instcombine<max-iterations=1;no-verify-fixpoint>)" on module "<stdin>"
2.	Running pass "instcombine<max-iterations=1;no-verify-fixpoint>" on function "bb_constraint_case1"
 #0 0x000000010ff14018 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/opt+0x101aac018)
 #1 0x000000010ff11dd8 llvm::sys::RunSignalHandlers() (/Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/opt+0x101aa9dd8)
 #2 0x000000010ff147f7 SignalHandler(int) (/Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/opt+0x101aac7f7)
 #3 0x00007ff80b6cdfdd (/usr/lib/system/libsystem_platform.dylib+0x7ff80046afdd)
 #4 0x0000000000000000 
 #5 0x00007ff80b5c4a79 (/usr/lib/system/libsystem_c.dylib+0x7ff800361a79)
 #6 0x00007ff80b5c3d68 (/usr/lib/system/libsystem_c.dylib+0x7ff800360d68)
 #7 0x00000001110f5ba3 llvm::Instruction::hasAllowReassoc() const (.cold.2) (/Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/opt+0x102c8dba3)
 #8 0x000000010f46c23c llvm::Instruction::hasAllowReassoc() const (/Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/opt+0x10100423c)
 #9 0x000000010f91f981 llvm::InstCombinerImpl::visitFDiv(llvm::BinaryOperator&) (/Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/opt+0x1014b7981)
#10 0x000000010f871c9e llvm::InstCombinerImpl::run() (/Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/opt+0x101409c9e)
#11 0x000000010f875386 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&) (/Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/opt+0x10140d386)
#12 0x000000010f8747c0 llvm::InstCombinePass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/opt+0x10140c7c0)
#13 0x00000001103ada62 llvm::detail::PassModel<llvm::Function, llvm::InstCombinePass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/opt+0x101f45a62)
#14 0x000000010f4e249c llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/opt+0x10107a49c)
#15 0x000000010e4c7912 llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/opt+0x10005f912)
#16 0x000000010f4e6b4c llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/opt+0x10107eb4c)
#17 0x000000010e4c7672 llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/opt+0x10005f672)
#18 0x000000010f4e158c llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/opt+0x10107958c)
#19 0x00000001104215ba llvm::runPassPipeline(llvm::StringRef, llvm::Module&, llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, llvm::ArrayRef<llvm::PassPlugin>, llvm::ArrayRef<std::__1::function<void (llvm::PassBuilder&)>>, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool, bool) (/Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/opt+0x101fb95ba)
#20 0x000000011042e261 optMain (/Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/opt+0x101fc6261)
#21 0x00007ff80b313345 
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/FileCheck /Volumes/RAMDisk/buildbot-root/x86_64-darwin/llvm-project/llvm/test/Transforms/InstCombine/fsqrtdiv-transform.ll

--

********************


```

</details>

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


More information about the llvm-commits mailing list