diff options
author | Philip Reames <listmail@philipreames.com> | 2019-03-13 03:25:20 +0000 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2019-03-13 03:25:20 +0000 |
commit | 21a50ccf9c744780e3c143b60aa46889311f01da (patch) | |
tree | df0b1ef459c37ee293561bbf5a9608ee5c913a63 /llvm/lib/CodeGen | |
parent | 48b169079f22aa32c749ffd76b79e2a0f86d0eea (diff) | |
download | bcm5719-llvm-21a50ccf9c744780e3c143b60aa46889311f01da.tar.gz bcm5719-llvm-21a50ccf9c744780e3c143b60aa46889311f01da.zip |
[ImplicitNullChecks] Support unordered atomic accesses
Update the INC pass to allow folding unordered atomics. This is the first optimization unblocked by the changes landed from D57601.
llvm-svn: 356006
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/ImplicitNullChecks.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/ImplicitNullChecks.cpp b/llvm/lib/CodeGen/ImplicitNullChecks.cpp index 75f4eef5dc1..68110314151 100644 --- a/llvm/lib/CodeGen/ImplicitNullChecks.cpp +++ b/llvm/lib/CodeGen/ImplicitNullChecks.cpp @@ -235,11 +235,8 @@ bool ImplicitNullChecks::canHandle(const MachineInstr *MI) { assert(!llvm::any_of(MI->operands(), IsRegMask) && "Calls were filtered out above!"); - // TODO: This should be isUnordered (see D57601) once test cases are written - // demonstrating that. - auto IsSimple = [](MachineMemOperand *MMO) { - return !MMO->isVolatile() && !MMO->isAtomic(); }; - return llvm::all_of(MI->memoperands(), IsSimple); + auto IsUnordered = [](MachineMemOperand *MMO) { return MMO->isUnordered(); }; + return llvm::all_of(MI->memoperands(), IsUnordered); } ImplicitNullChecks::DependenceResult |