From 91ee4ea7b69b6dcc5625f66988bc5ab6a864ee4c Mon Sep 17 00:00:00 2001 From: Anton Mitrokhin Date: Thu, 4 Dec 2014 17:13:07 +0300 Subject: [PATCH] add guards to prevent unfolded 'ConstantExpr' from sneaking into 'lConstantElementsToMask' - we handle only Ints and Doubles there --- opt.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opt.cpp b/opt.cpp index 62370bcc..5005ddc9 100644 --- a/opt.cpp +++ b/opt.cpp @@ -367,6 +367,8 @@ lGetMask(llvm::Value *factor, uint64_t *mask) { llvm::dyn_cast(cv->getOperand(i)); if (c == NULL) return false; + if (llvm::isa(cv->getOperand(i)) ) + return false; // We can not handle constant expressions here elements.push_back(c); } *mask = lConstElementsToMask(elements);