@@ -147,9 +147,7 @@ where
147
147
// Transmute to the return type, previously asserted to be the same size
148
148
let mut bitmask: [ u8 ; N ] = core:: mem:: transmute_copy ( & bitmask) ;
149
149
150
- // There is a bug where LLVM appears to implement this operation with the wrong
151
- // bit order.
152
- // TODO fix this in a better way
150
+ // LLVM assumes bit order should match endianness
153
151
if cfg ! ( target_endian = "big" ) {
154
152
for x in bitmask. as_mut ( ) {
155
153
* x = x. reverse_bits ( ) ;
@@ -174,9 +172,7 @@ where
174
172
// The transmute below allows this function to be marked safe, since it will prevent
175
173
// monomorphization errors in the case of an incorrect size.
176
174
unsafe {
177
- // There is a bug where LLVM appears to implement this operation with the wrong
178
- // bit order.
179
- // TODO fix this in a better way
175
+ // LLVM assumes bit order should match endianness
180
176
if cfg ! ( target_endian = "big" ) {
181
177
for x in bitmask. as_mut ( ) {
182
178
* x = x. reverse_bits ( ) ;
@@ -204,9 +200,7 @@ where
204
200
// Safety: U is required to be the appropriate bitmask type
205
201
let bitmask: U = unsafe { intrinsics:: simd_bitmask ( self . 0 ) } ;
206
202
207
- // There is a bug where LLVM appears to implement this operation with the wrong
208
- // bit order.
209
- // TODO fix this in a better way
203
+ // LLVM assumes bit order should match endianness
210
204
if cfg ! ( target_endian = "big" ) {
211
205
bitmask. reverse_bits ( )
212
206
} else {
@@ -219,9 +213,7 @@ where
219
213
where
220
214
super :: Mask < T , LANES > : ToBitMask < BitMask = U > ,
221
215
{
222
- // There is a bug where LLVM appears to implement this operation with the wrong
223
- // bit order.
224
- // TODO fix this in a better way
216
+ // LLVM assumes bit order should match endianness
225
217
let bitmask = if cfg ! ( target_endian = "big" ) {
226
218
bitmask. reverse_bits ( )
227
219
} else {
0 commit comments