Page MenuHomePhabricator

InstCombine: Preserve nuw when reassociating nuw ops
Needs ReviewPublic

Authored by arsenm on Oct 30 2017, 6:40 AM.

Details

Reviewers
majnemer
nlopes
Summary

Alive says this is OK

Diff Detail

Event Timeline

arsenm created this revision.Oct 30 2017, 6:40 AM
efriedma added a subscriber: efriedma.
nlopes edited edge metadata.Nov 22 2017, 10:51 AM

This patch LGTM, except for the changes in tryFactorization(). It seems there's some code missing.

https://rise4fun.com/Alive/L2c

lib/Transforms/InstCombine/InstructionCombining.cpp
633

This variable is never used. It's defined over the next few lines, but never used to set NUW on the instruction.