summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2017-02-12 16:40:30 +0000
committerSanjay Patel <spatel@rotateright.com>2017-02-12 16:40:30 +0000
commit45b7e69fefae98ad3c747fd090e6aafcf2cba94f (patch)
treeea1cd8ab1db48e0651966ca69112cb823157a946 /lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
parent97e4b98749572c96eecfdd3860437cab5d688b8b (diff)
[InstCombine] fold icmp sgt/slt (add nsw X, C2), C --> icmp sgt/slt X, (C - C2)
I found one special case of this transform for 'slt 0', so I removed that and added the general transform. Alive code to check correctness: Name: slt_no_overflow Pre: WillNotOverflowSignedSub(C1, C2) %a = add nsw i8 %x, C2 %b = icmp slt %a, C1 => %b = icmp slt %x, C1 - C2 Name: sgt_no_overflow Pre: WillNotOverflowSignedSub(C1, C2) %a = add nsw i8 %x, C2 %b = icmp sgt %a, C1 => %b = icmp sgt %x, C1 - C2 http://rise4fun.com/Alive/MH Differential Revision: https://reviews.llvm.org/D29774 llvm-svn: 294898
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp')
0 files changed, 0 insertions, 0 deletions