summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMConstantPoolValue.cpp
diff options
context:
space:
mode:
authorJames Molloy <james.molloy@arm.com>2016-07-05 12:37:13 +0000
committerJames Molloy <james.molloy@arm.com>2016-07-05 12:37:13 +0000
commitae5ff990ae558a9ac399cd84e8ad4b0ee7cde2a4 (patch)
tree4963c6bd5f9eda777d2a8e8f53de6ccbd7580c72 /llvm/lib/Target/ARM/ARMConstantPoolValue.cpp
parent136332888a9ead7313cae865d53be070f2ede90f (diff)
downloadbcm5719-llvm-ae5ff990ae558a9ac399cd84e8ad4b0ee7cde2a4.tar.gz
bcm5719-llvm-ae5ff990ae558a9ac399cd84e8ad4b0ee7cde2a4.zip
[Thumb] Reapply r272251 with a fix for PR28348 (mk 2)
The important thing I was missing was ensuring newly added constants were kept in topological order. Repositioning the node is correct if the constant is newly added (so it has no topological ordering) but wrong if it already existed - positioning it next in the worklist would break the topological ordering. Original commit message: [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: 274543
Diffstat (limited to 'llvm/lib/Target/ARM/ARMConstantPoolValue.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud