summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorQuentin Colombet <qcolombet@apple.com>2015-04-02 18:54:23 +0000
committerQuentin Colombet <qcolombet@apple.com>2015-04-02 18:54:23 +0000
commita64723c2bf3a6dade77aa9b87046ec1e72b0a669 (patch)
tree662b375a0cbe52da08a1bac0f332e506478592ad /llvm/lib
parentc00ca313fde334bf42af35dae9e870e90fffd278 (diff)
downloadbcm5719-llvm-a64723c2bf3a6dade77aa9b87046ec1e72b0a669.tar.gz
bcm5719-llvm-a64723c2bf3a6dade77aa9b87046ec1e72b0a669.zip
[AArch64] Add a comment to make it explicit why we increased the complexity.
Follow-up of r233653. llvm-svn: 233936
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AArch64/AArch64InstrFormats.td4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64InstrFormats.td b/llvm/lib/Target/AArch64/AArch64InstrFormats.td
index 555b5006eba..0e457329f73 100644
--- a/llvm/lib/Target/AArch64/AArch64InstrFormats.td
+++ b/llvm/lib/Target/AArch64/AArch64InstrFormats.td
@@ -1637,6 +1637,10 @@ multiclass AddSub<bit isSub, string mnemonic,
SDPatternOperator OpNode = null_frag> {
let hasSideEffects = 0, isReMaterializable = 1, isAsCheapAsAMove = 1 in {
// Add/Subtract immediate
+ // Increase the weight of the immediate variant to try to match it before
+ // the extended register variant.
+ // We used to match the register variant before the immediate when the
+ // register argument could be implicitly zero-extended.
let AddedComplexity = 6 in
def Wri : BaseAddSubImm<isSub, 0, GPR32sp, GPR32sp, addsub_shifted_imm32,
mnemonic, OpNode> {
OpenPOWER on IntegriCloud