diff options
| author | James Molloy <james.molloy@arm.com> | 2016-06-09 07:39:08 +0000 | 
|---|---|---|
| committer | James Molloy <james.molloy@arm.com> | 2016-06-09 07:39:08 +0000 | 
| commit | feb9f4243bf6f8f6b9b554f78a81b959567ec040 (patch) | |
| tree | 65fe28ec70a564d66ad0d8b0da1928123b138cbf /llvm/utils/vim | |
| parent | 8537c11ff3e815458ac9c83f675922517db62647 (diff) | |
| download | bcm5719-llvm-feb9f4243bf6f8f6b9b554f78a81b959567ec040.tar.gz bcm5719-llvm-feb9f4243bf6f8f6b9b554f78a81b959567ec040.zip | |
[Thumb] Select a BIC instead of AND if the immediate can be encoded more optimally negated
If an immediate is only used in an AND node, it is possible that the immediate can be more optimally materialized when negated. If this is the case, we can negate the immediate and use a BIC instead;
  int i(int a) {
    return a & 0xfffffeec;
  }
Used to produce:
    ldr r1, [CONSTPOOL]
    ands r0, r1
  CONSTPOOL: 0xfffffeec
And now produces:
    movs    r1, #255
    adds    r1, #20  ; Less costly immediate generation
    bics    r0, r1
llvm-svn: 272251
Diffstat (limited to 'llvm/utils/vim')
0 files changed, 0 insertions, 0 deletions

