Fix ARM peephole optimizeCompare to avoid optimizing unsigned cmp to 0.
authorJan Wen Voung <jvoung@google.com>
Mon, 2 Feb 2015 16:56:50 +0000 (16:56 +0000)
committerJan Wen Voung <jvoung@google.com>
Mon, 2 Feb 2015 16:56:50 +0000 (16:56 +0000)
commitd21194f71246d5fa2f9530b2fb70e1778fc77ef9
tree2c4cf4bd59084e391682033f6ac2b4bedf58c3eb
parent526e0929a5f8ba293fa200f7c5b78682136dcf84
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
llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
llvm/test/CodeGen/ARM/sub-cmp-peephole.ll