[PATCH] D158960: [ValueTracking] Handle conflicts when computing knownbits of PHI nodes in deadcode; PR65022

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 28 10:43:00 PDT 2023


nikic added inline comments.


================
Comment at: llvm/test/Analysis/ValueTracking/knownbits-phi-deadcode.ll:2
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
+; RUN: opt -O1 -S < %s | FileCheck %s
+; This reduced testcase from pr65022. We are only testing that is doesn't crash.
----------------
goldstein.w.n wrote:
> goldstein.w.n wrote:
> > nikic wrote:
> > > Please reduce this to a single pass invocation.
> > Done, by chance do you know if there is a way to get llvm-reduce to do this for you?
> > 
> > I ended up going through the `-O1` passes manually until I could isolate to a single pass (and get necessary transforms from pre-existing passes) but have to feel there is a better way.
> > 
> > Also tried `--print-after-all` but that often doesn't give complete IR. Just curious if there is some "good" way to do this or is it just figure it out with pass pipeline + ir dumps?
> Actually I guess in retrospect what I would do is get pass thats failing (easy enough). Run pipeline up to that pass and dump IR. Then just run that single pass. Shouldn't be as complicated as I made it.
You can use `-print-on-crash -print-module-scope`. There is also utils/reduce_pipeline.py for cases where that's not feasible.

Also, this test still doesn't look very minimal, can you please run it through llvm-reduce?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158960



More information about the llvm-commits mailing list