summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorJuergen Ributzka <juergen@apple.com>2014-11-18 21:02:40 +0000
committerJuergen Ributzka <juergen@apple.com>2014-11-18 21:02:40 +0000
commit7a7c4684e41e4f7ecf6b77fd162abcb4596a6ec1 (patch)
tree74a19e36e68ce0e2eac7ed53d231b80b7faa1917 /llvm/tools
parentb5a259935c60bf318870f3bf4835978f7ebbb098 (diff)
downloadbcm5719-llvm-7a7c4684e41e4f7ecf6b77fd162abcb4596a6ec1.tar.gz
bcm5719-llvm-7a7c4684e41e4f7ecf6b77fd162abcb4596a6ec1.zip
[AArch64] Don't optimize all compare instructions.
"optimizeCompareInstr" converts compares (cmp/cmn) into plain sub/add instructions when the flags are not used anymore. This conversion is valid for most instructions, but not all. Some instructions that don't set the flags (e.g. sub with immediate) can set the SP, whereas the flag setting version uses the same encoding for the "zero" register. Update the code to also check for the return register before performing the optimization to make sure that a cmp doesn't suddenly turn into a sub that sets the stack pointer. I don't have a test case for this, because it isn't easy to trigger. llvm-svn: 222255
Diffstat (limited to 'llvm/tools')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud