[BPF] Undo transformation for LICM.cpp:hoistMinMax()
Extended BPFCheckAndAdjustIR pass with sinkMinMax() transformation that undoes LICM hoistMinMax pass. The undo transformation converts the following patterns: x < min(a, b) -> x < a && x < b x > min(a, b) -> x > a || x > b x < max(a, b) -> x < a || x < b x > max(a, b) -> x > a && x > b Where 'a' or 'b' is a constant. Also supports `sext min(...) ...` and `zext min(...) ...`. ~~~ This was previously commited as 09feee55 and reverted in 0bf9bfea because of the testbot memory leak report: https://lab.llvm.org/buildbot/#/builders/5/builds/34931 The memory leak issue was caused by incorrect instruction removal sequence in skinMinMaxBB(): I->dropAllReferences(); --------> I->eraseFromParent(); I->removeFromParent(); fixed to Differential Revision: https://reviews.llvm.org/D147990
Loading
Please sign in to comment