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)
commit1a63641597639d19597e2629bab134c2642c3bc3
treedf3fb19815ff8e85d5b885a4d09758d674227d06
parent40d542097aef5f334d870aa7a4c169ca1afc5763
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227809 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMBaseInstrInfo.cpp
test/CodeGen/ARM/sub-cmp-peephole.ll