[llvm-dev] [llvm-reduce] Reduction to undef/poison/null?

Chris Lattner via llvm-dev llvm-dev at lists.llvm.org
Fri Sep 3 09:17:57 PDT 2021



> On Aug 31, 2021, at 9:04 AM, Johannes Doerfert via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> 
> On 8/30/21 1:36 PM, Arthur Eubanks wrote:
>> I frequently use llvm-reduce just to minimize a crash caused by some change
>> and present that to the author of a change to look at. I don't think that
>> having tons of freeze poisons in a repro file is nice to work with. If a
>> crash repros with a `0` as opposed to a `freeze poison` the `0` seems much
>> more appealing to present.
>> 
>> We could add a flag to reduce to the various options here if people have
>> different needs.
> 
> Yeah, maybe. I think it's clear undef is often not the best choice.

I agree with the meta point here - use of undef will make the behavior far less predictable, and therefore make reduction more annoying.  I think it makes a lot of sense to use a deterministic zero value instead of undef.

Is there any _disadvantage_ to doing that?

-Chris


More information about the llvm-dev mailing list