[PATCH] D81790: Added hasSamePropertiesAs method for CmpXchgInst and FenceInst
JF Bastien via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 17 10:13:27 PDT 2020
jfb added inline comments.
================
Comment at: llvm/include/llvm/IR/Instruction.h:682
+ // comparisions between instructions whose subclass is not known.
+ int hasSamePropertiesAs(const Instruction *I) const;
+
----------------
We have `isIdenticalTo` above, and then we have `isSameOperationAs`. The later details how it's different from the former. You ought to do the same thing here.
================
Comment at: llvm/lib/IR/Instructions.cpp:1567
+ cmpIntegers(int(this->getSuccessOrdering()),
+ int(cast<AtomicCmpXchgInst>(I)->getSuccessOrdering())))
+ return Res;
----------------
Can you compare ordering directly instead of casting, here and below?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81790/new/
https://reviews.llvm.org/D81790
More information about the llvm-commits
mailing list