As per title. This will allow the optimizer to pick up on it.
Details
Diff Detail
Event Timeline
lib/Transforms/Scalar/MemCpyOptimizer.cpp | ||
---|---|---|
536–537 | Unrelated change? Please commit separately if you want it. | |
639 | It is not intuitive (to me at least) that it is always a good thing, especially since tryMergingIntoMemset just above has a notion of profitability. |
lib/Transforms/Scalar/MemCpyOptimizer.cpp | ||
---|---|---|
639 | Yes, also one element aggregate would have been unpacked away by instcombine at this stage, so only somewhat large aggregate will be memsetted here. It is done after tryMergingIntoMemset because it is indeed less profitable so we want the most profitable optimization tried first. |
Unrelated change? Please commit separately if you want it.