Fix incorrect assertion for insertlane (#1355)

Previously, the assertion checked for `lane > 0` when it should have been `lane >= 0`; since lane is unsigned, this half of the assertion can be entirely removed.
This commit is contained in:
Andrew Brown
2020-01-17 14:39:31 -08:00
committed by GitHub
parent 80d11e3f8d
commit fd04ea2b06

View File

@@ -1173,7 +1173,7 @@ fn convert_insertlane(
// Floats are already in XMM registers and can stay there.
match value_type {
F32X4 => {
assert!(lane > 0 && lane <= 3);
assert!(lane <= 3);
let immediate = 0b00_00_00_00 | lane << 4;
// Insert 32-bits from replacement (at index 00, bits 7:8) to vector (lane
// shifted into bits 5:6).