[MI] Fix MachineInstr::isInvariantLoad.
authorJustin Lebar <jlebar@google.com>
Wed, 13 Jul 2016 22:34:50 +0000 (22:34 +0000)
committerJustin Lebar <jlebar@google.com>
Wed, 13 Jul 2016 22:34:50 +0000 (22:34 +0000)
commitdfd358f597cea078061476991bfeea06b9c3a7d4
tree25400ad93e7f2735e38ac313f4effbe3a6e1fc17
parent7d2aecbc76f7591ff0f85daf9fd9ec4cbc3b29f6
[MI] Fix MachineInstr::isInvariantLoad.

Summary:
Previously it would say we had an invariant load if any of the memory
operands were invariant.  But the load should be invariant only if *all*
the memory operands are invariant.

No testcase because this has proven to be very difficult to tickle in
practice.  As just one example, ARM's ldrd instruction, which loads 64
bits into two 32-bit regs, is theoretically affected by this.  But when
it's produced, it loses its memoperands' invariance bits!

Reviewers: jfb

Subscribers: llvm-commits, aemerson

Differential Revision: http://reviews.llvm.org/D22318

llvm-svn: 275331
llvm/lib/CodeGen/MachineInstr.cpp