require simd_insert, simd_extract indices to be constants
This commit is contained in:
parent
0b9f6ad994
commit
396cf1e1f5
4 changed files with 29 additions and 9 deletions
|
@ -864,8 +864,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
.map(|(i, arg)| {
|
||||
// The indices passed to simd_shuffle in the
|
||||
// third argument must be constant. This is
|
||||
// checked by const-qualification, which also
|
||||
// promotes any complex rvalues to constants.
|
||||
// checked by the type-checker.
|
||||
if i == 2 && intrinsic == sym::simd_shuffle {
|
||||
if let mir::Operand::Constant(constant) = &arg.node {
|
||||
let (llval, ty) = self.simd_shuffle_indices(bx, constant);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue