Skip to content

Commit 290f38c

Browse files
authored
IR: fix getSwappedCmpPredicate() return type (#120097)
The change 51a895a (IR: introduce struct with CmpInst::Predicate and samesign) missed a change to ICmpInst::getSwappedCmpPredicate(), which intends to return a CmpPredicate, but returns a Predicate instead. Fix this.
1 parent 3cbc73f commit 290f38c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/include/llvm/IR/Instructions.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,9 +1226,9 @@ class ICmpInst: public CmpInst {
12261226
return {getSwappedPredicate(Pred), Pred.hasSameSign()};
12271227
}
12281228

1229-
/// @returns the swapped predicate.
1230-
Predicate getSwappedCmpPredicate() const {
1231-
return getSwappedPredicate(getCmpPredicate());
1229+
/// @returns the swapped predicate along with samesign information.
1230+
CmpPredicate getSwappedCmpPredicate() const {
1231+
return getSwappedCmpPredicate(getCmpPredicate());
12321232
}
12331233

12341234
/// For example, EQ->EQ, SLE->SLE, UGT->SGT, etc.

0 commit comments

Comments
 (0)