fix for llvm < 11

This commit is contained in:
van Hauser 2021-01-04 17:53:47 +01:00
parent 9c15f53a47
commit 1842c8390f

View File

@ -232,7 +232,11 @@ bool CmpLogInstructions::hookInstrs(Module &M) {
if (selectcmpInst->getOpcode() == Instruction::FCmp) {
auto ty0 = op0->getType();
if (ty0->isHalfTy() || ty0->isBFloatTy())
if (ty0->isHalfTy()
#if LLVM_VERSION_MAJOR >= 11
|| ty0->isBFloatTy()
#endif
)
max_size = 16;
else if (ty0->isFloatTy())
max_size = 32;