[PATCH] Enhance boolean simplification to handle more cases

Arnold Schwaighofer aschwaighofer at apple.com
Wed Apr 10 18:05:00 PDT 2013


On Apr 10, 2013, at 7:03 PM, Michael Liao <michael.liao at intel.com> wrote:

> On Wed, 2013-04-10 at 18:59 -0500, Arnold Schwaighofer wrote:
>> Incidentally, I have been working on a very similar patch today. You beat me to it. :P
>> 
>> I tried the test cases from your patch and my patch does not catch all of them (I am guessing because I am not flexible on which side the constant to the AND is). So let me review your patch.
>> 
>> +static SDValue checkBoolTestSetCCCombine(SelectionDAG &DAG,
>> 
>> I don't think the extra parameter is really needed. You only use it for debug output as far as I can tell.
>> 
>> +  DEBUG(dbgs() << "Unhandled node in boolean test checking: ");
>> +  DEBUG(SetCC.getNode()->dump(&DAG));
>> +  DEBUG(dbgs() << "\n");
>> 
>> This looks like debugging output from while you were developing, can you remove it?
> 
> I intentionally leave it there and want to capture some cases may need
> handling in the future. I am not sure whether it's OK. If not, I will
> leave them in my private branch.

You would be the only one looking for it and the only one who would understand why it is there. I think it is better kept in your private repo.

- Arnold



More information about the llvm-commits mailing list