InstCombine: Optimize -x s< cst
authorDavid Majnemer <david.majnemer@gmail.com>
Thu, 15 May 2014 00:02:20 +0000 (00:02 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Thu, 15 May 2014 00:02:20 +0000 (00:02 +0000)
commite880187bb66294944e68c1d5e099813adb4b55e2
treedc8d4ba6627e4350741769156444d3c7f03521d9
parentdc3725862b05d4f3f070feefadf3a6a46ebf272c
InstCombine: Optimize -x s< cst

Summary:
This gets rid of a sub instruction by moving the negation to the
constant when valid.

Reviewers: nicholas

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208827 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCompares.cpp
test/Transforms/InstCombine/icmp.ll