1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

Make widenable condition transparent for MemoryWriteTracking

Side effects of widenable condition intrinsic are modelled via
InaccessibleMemOnly, and there is no way to say that it isn't
really writing any memory. This patch teaches MemoryWriteTracking
ignore this intrinsic.

llvm-svn: 354021
This commit is contained in:
Max Kazantsev 2019-02-14 11:10:29 +00:00
parent 60734592fa
commit b7242fec0a

View File

@ -19,6 +19,7 @@
#include "llvm/Analysis/InstructionPrecedenceTracking.h" #include "llvm/Analysis/InstructionPrecedenceTracking.h"
#include "llvm/Analysis/ValueTracking.h" #include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/PatternMatch.h"
using namespace llvm; using namespace llvm;
@ -152,5 +153,8 @@ bool ImplicitControlFlowTracking::isSpecialInstruction(
bool MemoryWriteTracking::isSpecialInstruction( bool MemoryWriteTracking::isSpecialInstruction(
const Instruction *Insn) const { const Instruction *Insn) const {
using namespace PatternMatch;
if (match(Insn, m_Intrinsic<Intrinsic::experimental_widenable_condition>()))
return false;
return Insn->mayWriteToMemory(); return Insn->mayWriteToMemory();
} }