[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)
commitff8bc4a1cf855f68307afe98f642d86136f88df5
treeb4ddd076df2259d3f94f69aec2281bffff40f3ad
parent13b86678de0a06ef553e757ab6b7e912cd1d8771
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275331 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachineInstr.cpp