[PATCH] D100099: [X86][CostModel] Try to fix cost computation load/stores of non-power-of-two vectors

Steven Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 20 16:03:00 PDT 2021


srj added a comment.

Update:

- rerunning bisect still points at this commit.
- it looks like the reproducer I uploaded does indeed hang llc quite a ways back -- even llc from an LLVM12 build hangs in the same way.
- running llc at -O0 succeeds, but -O1 or higher still fails.
- Looks like we're triggering exponential runtime somewhere under TargetLowering::SimplifyDemandedBits.

Given this behavior, perhaps this is a pre-existing bug in the optimizer, which was never triggered before until this change "unmasked" it?

I'm trying to figure out if there's a way to get you a repro case without requiring you to build Halide locally (since the hang occurs when Halide uses MCJIT).

If you don't mind pulling and building Halide locally, it is easy to repro; here are steps in case you want to try (assumes a linux env):

- git clone https://github.com/halide/Halide
- cd Halide
- git checkout srj/hang-repro   # This is a branch I made to simplify the repro
- export LLVM_CONFIG=/path/to/llvm/install/dir
- export HL_JIT_TARGET=x86-64-linux-sse41
- make -j$(nproc) correctness_vector_reductions

Note that this target runs with a 60-second timeout (which is generous, as it should normally be well under a second).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100099/new/

https://reviews.llvm.org/D100099



More information about the llvm-commits mailing list