[PATCH] D29314: [Instcombine] Combine consecutive identical fences
Davide Italiano via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 31 10:20:56 PST 2017
davide added inline comments.
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:3275-3276
+ if (auto *NFI = dyn_cast<FenceInst>(FI.getNextNode()))
+ if (NFI->getSynchScope() == FI.getSynchScope() &&
+ NFI->getOrdering() == FI.getOrdering())
+ return eraseInstFromFunction(FI);
> I think you could just do `if (FI.isIdenticalTo(NFI))`
I was actually looking for that function (but didn't find it), thanks for the review.
More information about the llvm-commits