[PATCH] Add an instcombine rule to optimize max(~a, ~b) to ~min(a, b) when profitable
Filipe Cabecinhas
filcab+llvm.phabricator at gmail.com
Sun Feb 22 23:05:33 PST 2015
================
Comment at: lib/Transforms/InstCombine/InstCombineSelect.cpp:1182
@@ +1181,3 @@
+ if (BO->getOpcode() == Instruction::Add ||
+ BO->getOpcode() == Instruction::Sub)
+ return isa<Constant>(BO->getOperand(0)) ||
----------------
We do this test here, but the calculation for Profitable only cares about Not.
Do we really need this (or should we just check for this in the Porfitable calculation too)?
http://reviews.llvm.org/D7821
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list