[llvm] [IR] PossiblyExactOperator -> PossiblyExactInst (NFC) (PR #72501)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 17 00:43:13 PST 2023


================
@@ -314,7 +314,9 @@ void Instruction::setHasNoSignedWrap(bool b) {
 }
 
 void Instruction::setIsExact(bool b) {
-  cast<PossiblyExactOperator>(this)->setIsExact(b);
+  assert(isa<PossiblyExactInst>(this) && "Instruction must support exact flag");
----------------
nikic wrote:

Hm, the change to the structure here was was intentional, because the old approach seemed somewhat convoluted to me, now that PossiblyExactInst is a direct descendant of Instruction. This matches the implementation of PossiblyNonNegInst now (admittedly, also added by me).

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


More information about the llvm-commits mailing list