With unoptimized code, we may see lots of stores and spend too much time in mergeTruncStores.
Fixes PR51827.
Differential D111596
[SelectionDAG] Bail out of mergeTruncStores when not optimizing aeubanks on Oct 11 2021, 6:53 PM. Authored by
Details With unoptimized code, we may see lots of stores and spend too much time in mergeTruncStores. Fixes PR51827.
Diff Detail
Unit Tests
Event TimelineComment Actions I see similar checks sprinkled around DAGCombiner, so I guess this is ok too. Not sure if it is possible to do this at a higher level and remove those checks though. But shouldn't this change the codegen for a reduced example of https://llvm.org/PR51827 ? Or is there some other optnone check that hides this one? Comment Actions This patch doesn't affect the codegen of the attached IR, but speeds it up a lot. It's probably bailing somewhere in mergeTruncStores() for most inputs. Comment Actions LGTM - it would be nicer if we had a higher-level bailout for optnone / -O0 instead of individual checks scattered around the combiner, but that might be (practically) impossible? Comment Actions A question I had while looking into this, why is this (and other store optimizations) being done in isel instead on the IR optimization side? |