[Analysis] Simplify the interface to llvm::getICmpCode. NFC
authorCraig Topper <craig.topper@sifive.com>
Tue, 1 Mar 2022 17:53:26 +0000 (09:53 -0800)
committerCraig Topper <craig.topper@sifive.com>
Tue, 1 Mar 2022 17:53:27 +0000 (09:53 -0800)
commit7bc666784566187c440a213a2cd2bf98658251f5
treeee57538e9b48c458808cd16fdcb2051f3a8d3afe
parent17ce89fa8016758be2ec879c5560e506cad4c362
[Analysis] Simplify the interface to llvm::getICmpCode. NFC

Instead of passing an InstCmpInt * and a bool just pass the predicate
from the caller.

I'm considering moving the similar FCmp functions from InstCombine
over here and this makes the interface consistent with what is used
for FCmp.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D120609
llvm/include/llvm/Analysis/CmpInstAnalysis.h
llvm/lib/Analysis/CmpInstAnalysis.cpp
llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp