about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--instrumentation/cmplog-instructions-pass.cc6
1 files changed, 5 insertions, 1 deletions
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;