mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-02 07:17:36 +00:00
Teach PatternMatch that splat vectors could be floating point as well as
integer. Fixes PR9228! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125613 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -81,7 +81,8 @@ struct apint_match {
|
||||
return true;
|
||||
}
|
||||
if (ConstantVector *CV = dyn_cast<ConstantVector>(V))
|
||||
if (ConstantInt *CI = cast_or_null<ConstantInt>(CV->getSplatValue())) {
|
||||
if (ConstantInt *CI =
|
||||
dyn_cast_or_null<ConstantInt>(CV->getSplatValue())) {
|
||||
Res = &CI->getValue();
|
||||
return true;
|
||||
}
|
||||
@@ -126,7 +127,7 @@ struct cst_pred_ty : public Predicate {
|
||||
if (const ConstantInt *CI = dyn_cast<ConstantInt>(V))
|
||||
return this->isValue(CI->getValue());
|
||||
if (const ConstantVector *CV = dyn_cast<ConstantVector>(V))
|
||||
if (ConstantInt *CI = cast_or_null<ConstantInt>(CV->getSplatValue()))
|
||||
if (ConstantInt *CI = dyn_cast_or_null<ConstantInt>(CV->getSplatValue()))
|
||||
return this->isValue(CI->getValue());
|
||||
return false;
|
||||
}
|
||||
@@ -146,7 +147,7 @@ struct api_pred_ty : public Predicate {
|
||||
return true;
|
||||
}
|
||||
if (const ConstantVector *CV = dyn_cast<ConstantVector>(V))
|
||||
if (ConstantInt *CI = cast_or_null<ConstantInt>(CV->getSplatValue()))
|
||||
if (ConstantInt *CI = dyn_cast_or_null<ConstantInt>(CV->getSplatValue()))
|
||||
if (this->isValue(CI->getValue())) {
|
||||
Res = &CI->getValue();
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user