From 1842c8390f828ee4e453cf43fc8e7b82e287d22f Mon Sep 17 00:00:00 2001 From: van Hauser Date: Mon, 4 Jan 2021 17:53:47 +0100 Subject: [PATCH] fix for llvm < 11 --- instrumentation/cmplog-instructions-pass.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/instrumentation/cmplog-instructions-pass.cc b/instrumentation/cmplog-instructions-pass.cc index 7ab38cf4..841ba0bd 100644 --- a/instrumentation/cmplog-instructions-pass.cc +++ b/instrumentation/cmplog-instructions-pass.cc @@ -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;