[llvm] [IR] Add disjoint flag for Or instructions. (PR #72583)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 22 11:03:11 PST 2023


================
@@ -318,10 +318,7 @@ void Instruction::setIsExact(bool b) {
 }
 
 void Instruction::setIsDisjoint(bool b) {
-  assert(isa<PossiblyDisjointInst>(this) && "Must be or");
-  SubclassOptionalData =
-      (SubclassOptionalData & ~PossiblyDisjointInst::IsDisjoint) |
-      (b * PossiblyDisjointInst::IsDisjoint);
+  cast<PossiblyDisjointInst>(this)->setIsDisjoint(b);
----------------
nikic wrote:

I believe the suggestion was to not have these methods on Instruction, only the ones on PossiblyDisjointInst.

https://github.com/llvm/llvm-project/pull/72583


More information about the llvm-commits mailing list