From 0fb6dce689b1dbae37666b656f1b29e9d6bf67a3 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 1 May 2018 12:06:34 -0400 Subject: [PATCH] emit_x64_vector: Remove unnecessary if constexpr expression in LogicalVShift This can simply be merged with the previous one. --- src/backend_x64/emit_x64_vector.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/backend_x64/emit_x64_vector.cpp b/src/backend_x64/emit_x64_vector.cpp index b43d9468..e1a0a607 100644 --- a/src/backend_x64/emit_x64_vector.cpp +++ b/src/backend_x64/emit_x64_vector.cpp @@ -928,17 +928,15 @@ static constexpr T LogicalVShift(T x, T y) { if (shift_amount >= bit_size) { return 0; } - } else if (shift_amount <= -bit_size || shift_amount >= bit_size) { - return 0; - } - if constexpr (std::is_signed_v) { if (shift_amount <= -bit_size) { // Parentheses necessary, as MSVC doesn't appear to consider cast parentheses // 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 return x >> (T(bit_size - 1)); } + } else if (shift_amount <= -bit_size || shift_amount >= bit_size) { + return 0; } if (shift_amount < 0) {