Unverified Commit 73e22ff3 authored by Akshay Deodhar's avatar Akshay Deodhar Committed by GitHub
Browse files

[Reassociate] Preserve NSW flags after expr tree rewriting (#93105)

We can guarantee NSW on all operands in a reassociated add expression
tree when:

- All adds in an add operator tree are NSW, AND either 
  - All add operands are guaranteed to be nonnegative, OR 
  - All adds are also NUW

- Alive2: 
- Nonnegative Operands
	- 3 operands: https://alive2.llvm.org/ce/z/G4XW6Q
	- 4 operands: https://alive2.llvm.org/ce/z/FWcZ6D
 - NUW NSW adds: https://alive2.llvm.org/ce/z/vRUxeC



---------

Co-authored-by: default avatarNikita Popov <github@npopov.com>
parent f0899964
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment