[llvm-dev] Incorrect placement of an instruction after PostRAScheduler pass

Bharathi Seshadri via llvm-dev llvm-dev at lists.llvm.org
Tue Dec 4 10:02:06 PST 2018


Thanks Tim, that worked.

Bharathi

On Mon, Dec 3, 2018 at 11:23 PM Tim Northover <t.p.northover at gmail.com> wrote:
>
> Hi Bharathi,
>
> On Tue, 4 Dec 2018 at 06:23, Bharathi Seshadri via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > After the Post RA Scheduling pass, note that CMPri %R12 has been moved
> > up the INLINE ASM. Since the inline asm has a {cmp, bne} pair, it is
> > incorrect to move the CMPri before the inline assembly block.
> > How do I prevent CMPri from being overridden by the cmp within the
> > inline asm block. Could it be that some dependency is incorrectly
> > specified ?
>
> You need to tell clang that you're clobbering CPSR in the asm block so
> that it doesn't think it can remain live across it. For some reason
> that's spelled "cc" in ARM land. So you'd write something like:
>
>     asm("ldaxr ..." : /* outputs */ : /* inputs */ : "cc");
>
> Cheers.
>
> Tim.


More information about the llvm-dev mailing list