summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectFile
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2013-08-13 21:30:58 +0000
committerJim Grosbach <grosbach@apple.com>2013-08-13 21:30:58 +0000
commit327ccc787eb5dec947a99a99390313a9fa88f907 (patch)
tree7f85aab36caaf898ebb10d093fe66f93a6fe37ee /lldb/source/Plugins/ObjectFile
parentd505fbf40376dd7ace0ef50e794a840f54091586 (diff)
downloadbcm5719-llvm-327ccc787eb5dec947a99a99390313a9fa88f907.tar.gz
bcm5719-llvm-327ccc787eb5dec947a99a99390313a9fa88f907.zip
DAG: Combine (and (setne X, 0), (setne X, -1)) -> (setuge (add X, 1), 2)
A common idiom is to use zero and all-ones as sentinal values and to check for both in a single conditional ("x != 0 && x != (unsigned)-1"). That generates code, for i32, like: testl %edi, %edi setne %al cmpl $-1, %edi setne %cl andb %al, %cl With this transform, we generate the simpler: incl %edi cmpl $1, %edi seta %al Similar improvements for other integer sizes and on other platforms. In general, combining the two setcc instructions into one is better. rdar://14689217 llvm-svn: 188315
Diffstat (limited to 'lldb/source/Plugins/ObjectFile')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud