[PATCH] D37121: [DivRemHoist] add a pass to move div/rem pairs into the same block (PR31028)
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 25 13:11:20 PDT 2017
spatel added inline comments.
================
Comment at: lib/Transforms/Scalar/DivRemHoist.cpp:83
+ continue;
+ RemInst->moveBefore(DivInst);
+ NumHoisted++;
----------------
dberlin wrote:
> It should go after, to retain the relative ordering.
Agreed, that feels better. But now I remember why I picked "moveBefore"...there is no "moveAfter". Is this an oversight of the API or is there something about 'after' that requires different logic? Looks like other places do:
I->removeFromParent();
I->insertAfter(OtherInst);
https://reviews.llvm.org/D37121
More information about the llvm-commits
mailing list