[PATCH] D11577: Reassociate: Implement isUnmovableInstruction() without a hardcoded list

Benjamin Kramer benny.kra at gmail.com
Tue Jul 28 15:24:40 PDT 2015


bkramer added a subscriber: bkramer.
bkramer added a comment.

In http://reviews.llvm.org/D11577#213912, @MatzeB wrote:

> Note that this change takes the [USF]Div and [USF]Rem instructions out of the list, with llvms semantics they do not produce side effects (but just a poison value) so this should be fine. I'm also running the llvm-testsuite now to get some more testing for this change.


Integer div by zero will still trap so div and rem cannot be moved freely between basic blocks without changing behavior. I'm not sure if Reassociate performs movements that could move instructions into a different path in the CFG, but if it does we'll need something stronger like `isSafeToSpeculativelyExecute`.


Repository:
  rL LLVM

http://reviews.llvm.org/D11577







More information about the llvm-commits mailing list