Skip to content

Commit 5a68272

Browse files
committed
try to make -fmerge-all-constants work
1 parent 9d9b64c commit 5a68272

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/spreadinterp.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -796,8 +796,8 @@ Two upsampfacs implemented. Params must match ref formula. Barnett 4/24/18 */
796796
static constexpr uint8_t if_odd_degree = ((nc + 1) % 2);
797797
static constexpr uint8_t offset_start = tail ? w - tail : w - simd_size;
798798
static constexpr uint8_t end_idx = (w + (tail > 0)) / 2;
799-
const simd_type zv{z};
800-
const simd_type z2v{zv * zv};
799+
const simd_type zv(z);
800+
const simd_type z2v = zv * zv;
801801

802802
// some xsimd constant for shuffle or inverse
803803
static constexpr auto shuffle_batch = []() constexpr noexcept {
@@ -811,8 +811,7 @@ Two upsampfacs implemented. Params must match ref formula. Barnett 4/24/18 */
811811
}();
812812

813813
// process simd vecs
814-
simd_type k_prev, k_sym;
815-
if constexpr (tail) k_sym = {0};
814+
simd_type k_prev, k_sym{0};
816815
for (uint8_t i{0}, offset = offset_start; i < end_idx;
817816
i += simd_size, offset -= simd_size) {
818817
auto k_odd = [i]() constexpr noexcept {

0 commit comments

Comments
 (0)