Reassociate: Reprocess RedoInsts after each inst
authorAditya Nandakumar <aditya_nandakumar@apple.com>
Tue, 26 Jan 2016 18:42:36 +0000 (18:42 +0000)
committerAditya Nandakumar <aditya_nandakumar@apple.com>
Tue, 26 Jan 2016 18:42:36 +0000 (18:42 +0000)
commit3d0c46d489400c7a4fd1c06e3150a0c8fc0cca37
tree647b3bde0dda692c966e5b7792a14b49f9338e0e
parent3f81a9c654302eb984995441c56cb6af372b6a75
Reassociate: Reprocess RedoInsts after each inst

Previously the RedoInsts was processed at the end of the block.
However it was possible that it left behind some instructions that
were not canonicalized.
This should guarantee that any previous instruction in the basic
block is canonicalized before we process a new instruction.

llvm-svn: 258830
llvm/lib/Transforms/Scalar/Reassociate.cpp
llvm/test/Transforms/Reassociate/prev_insts_canonicalized.ll [new file with mode: 0644]
llvm/test/Transforms/Reassociate/reassoc-intermediate-fnegs.ll
llvm/test/Transforms/Reassociate/xor_reassoc.ll