HomePhabricator

Fix ARM peephole optimizeCompare to avoid optimizing unsigned cmp to 0.

Authored by Jan Wen Voung <jvoung@google.com> on Feb 2 2015, 8:56 AM.

Description

Fix ARM peephole optimizeCompare to avoid optimizing unsigned cmp to 0.

Summary:
Previously it only avoided optimizing signed comparisons to 0.
Sometimes the DAGCombiner will optimize the unsigned comparisons
to 0 before it gets to the peephole pass, but sometimes it doesn't.

Fix for PR22373.

Test Plan: test/CodeGen/ARM/sub-cmp-peephole.ll

Reviewers: jfb, manmanren

Subscribers: aemerson, llvm-commits

Differential Revision: http://reviews.llvm.org/D7274

llvm-svn: 227809

Event Timeline

Jan Wen Voung <jvoung@google.com> committed rGd21194f71246: Fix ARM peephole optimizeCompare to avoid optimizing unsigned cmp to 0. (authored by Jan Wen Voung <jvoung@google.com>).Feb 2 2015, 8:56 AM