emit_x64_vector: Remove unnecessary if constexpr expression in LogicalVShift
This can simply be merged with the previous one.
This commit is contained in:
parent
5b71b1337b
commit
0fb6dce689
1 changed files with 2 additions and 4 deletions
|
@ -928,17 +928,15 @@ static constexpr T LogicalVShift(T x, T y) {
|
||||||
if (shift_amount >= bit_size) {
|
if (shift_amount >= bit_size) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else if (shift_amount <= -bit_size || shift_amount >= bit_size) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if constexpr (std::is_signed_v<T>) {
|
|
||||||
if (shift_amount <= -bit_size) {
|
if (shift_amount <= -bit_size) {
|
||||||
// Parentheses necessary, as MSVC doesn't appear to consider cast parentheses
|
// Parentheses necessary, as MSVC doesn't appear to consider cast parentheses
|
||||||
// as a grouping in terms of precedence, causing warning C4554 to fire. See:
|
// as a grouping in terms of precedence, causing warning C4554 to fire. See:
|
||||||
// https://developercommunity.visualstudio.com/content/problem/144783/msvc-2017-does-not-understand-that-static-cast-cou.html
|
// https://developercommunity.visualstudio.com/content/problem/144783/msvc-2017-does-not-understand-that-static-cast-cou.html
|
||||||
return x >> (T(bit_size - 1));
|
return x >> (T(bit_size - 1));
|
||||||
}
|
}
|
||||||
|
} else if (shift_amount <= -bit_size || shift_amount >= bit_size) {
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shift_amount < 0) {
|
if (shift_amount < 0) {
|
||||||
|
|
Loading…
Reference in a new issue