OSDN Git Service

[ARM] Skip inline asm memory operands in DAGToDAGISel
authorDiana Picus <diana.picus@linaro.org>
Mon, 18 Jul 2016 07:35:14 +0000 (07:35 +0000)
committerDiana Picus <diana.picus@linaro.org>
Mon, 18 Jul 2016 07:35:14 +0000 (07:35 +0000)
commitef2833b8f396dc2b5c63bc62135599b99d336273
tree1e62ae90510ed867a62b9c530b99b421364fb219
parentc9ba7aa68b755a0b749345d740e6f3eae24e5a6c
[ARM] Skip inline asm memory operands in DAGToDAGISel

The current logic for handling inline asm operands in DAGToDAGISel interprets
the operands by looking for constants, which should represent the flags
describing the kind of operand we're dealing with (immediate, memory, register
def etc). The operands representing actual data are skipped only if they are
non-const, with the exception of immediate operands which are skipped explicitly
when a flag describing an immediate is found.

The oversight is that memory operands may be const too (e.g. for device drivers
reading a fixed address), so we should explicitly skip the operand following a
flag describing a memory operand. If we don't, we risk interpreting that
constant as a flag, which is definitely not intended.

Fixes PR26038

Differential Revision: https://reviews.llvm.org/D22103

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275776 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMISelDAGToDAG.cpp
test/CodeGen/ARM/inlineasm3.ll