FailedChanges

Summary

  1. [DSE,MemorySSA] Simplify code, EarlierAccess is be a MemoryDef (NFC). (details)
  2. [GVN] add test for commutative intrinsic; NFC (details)
  3. [NewGVN] add test for commutative intrinsic; NFC (details)
  4. [IR][GVN] allow intrinsics in Instruction's isCommutative query (details)
  5. [DSE,MemorySSA] Skip defs without analyzable write locations. (details)
  6. Revert "[IR][GVN] allow intrinsics in Instruction's isCommutative query" (details)
Commit 42c57c294dfbd8ea82cd61c709289480f513211b by flo
[DSE,MemorySSA] Simplify code, EarlierAccess is be a MemoryDef (NFC).

After recent changes, we return early if Current is a MemoryPhi, so
EarlierAccess can only be a MemoryDef.
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
Commit 58b46231f3b715f5a7a81007064c241a9a37d2a2 by spatel
[GVN] add test for commutative intrinsic; NFC
The file was modifiedllvm/test/Transforms/GVN/commute.ll
Commit 342fea366f907e09eb12b12cfdeba7e9a056c2a3 by spatel
[NewGVN] add test for commutative intrinsic; NFC
The file was modifiedllvm/test/Transforms/NewGVN/commute.ll
Commit 25597f7783e7038b8a2ee88bb49ac605b211b564 by spatel
[IR][GVN] allow intrinsics in Instruction's isCommutative query

As discussed in D86798 / rG09652721 , we were potentially
returning a different result for whether an Instruction
is commutable depending on if we call the base class or
derived class method.

This requires relaxing an assert in GVN, but that pass
seems to be working otherwise.

NewGVN requires more work because it uses different
code paths for numbering binops and calls.
The file was modifiedllvm/include/llvm/IR/Instruction.h
The file was modifiedllvm/lib/Transforms/Scalar/NewGVN.cpp
The file was modifiedllvm/lib/Transforms/Scalar/GVN.cpp
The file was modifiedllvm/lib/IR/Instruction.cpp
The file was modifiedllvm/test/Transforms/GVN/commute.ll
Commit 86d817d7cf29750dfed1892d51110f44fc499c94 by flo
[DSE,MemorySSA] Skip defs without analyzable write locations.

Similar to other checks above, if there is no write location for a def,
it cannot be considered for elimination and can be skipped.
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
Commit badd7264e1500d3bcde5f78090024fe116c4ce29 by spatel
Revert "[IR][GVN] allow intrinsics in Instruction's isCommutative query"

This reverts commit 25597f7783e7038b8a2ee88bb49ac605b211b564.
It is causing crashing on bots such as:
http://lab.llvm.org:8011/builders/fuchsia-x86_64-linux/builds/10523/steps/ninja-build/logs/stdio
The file was modifiedllvm/test/Transforms/GVN/commute.ll
The file was modifiedllvm/include/llvm/IR/Instruction.h
The file was modifiedllvm/lib/IR/Instruction.cpp
The file was modifiedllvm/lib/Transforms/Scalar/NewGVN.cpp
The file was modifiedllvm/lib/Transforms/Scalar/GVN.cpp