cranelift: Disable select rule for i128 types on riscv64 (#5584)
* fuzzgen: Disable some selects for RISC-V * cranelift: Force disable gen_select_reg rule for i128 values
This commit is contained in:
@@ -612,7 +612,7 @@
|
||||
(gen_select ty (truthy_to_reg cty (normalize_cmp_value cty c)) x y))
|
||||
|
||||
(rule 1
|
||||
(lower (has_type ty (select (icmp cc a b @ (value_type in_ty)) x y)))
|
||||
(lower (has_type (fits_in_64 ty) (select (icmp cc a b @ (value_type in_ty)) x y)))
|
||||
(let ((a Reg (normalize_cmp_value in_ty a))
|
||||
(b Reg (normalize_cmp_value in_ty b)))
|
||||
(gen_select_reg cc a b x y)))
|
||||
|
||||
16
cranelift/filetests/filetests/isa/riscv64/issue-5583.clif
Normal file
16
cranelift/filetests/filetests/isa/riscv64/issue-5583.clif
Normal file
@@ -0,0 +1,16 @@
|
||||
test compile
|
||||
target riscv64
|
||||
|
||||
function u1:0() system_v {
|
||||
block0:
|
||||
v3 = iconst.i16 0
|
||||
v5 = iconst.i64 0
|
||||
v6 = uextend.i128 v5 ; v5 = 0
|
||||
v13 = icmp slt v3, v3 ; v3 = 0, v3 = 0
|
||||
v15 = select v13, v6, v6
|
||||
v20 = select v15, v5, v5 ; v5 = 0, v5 = 0
|
||||
v22 = ishl v13, v20
|
||||
v58 = iconst.i8 0
|
||||
v25 = udiv v22, v58 ; v58 = 0
|
||||
return
|
||||
}
|
||||
@@ -602,13 +602,10 @@ fn valid_for_target(triple: &Triple, op: Opcode, args: &[Type], rets: &[Type]) -
|
||||
// TODO
|
||||
(Opcode::SelectSpectreGuard, &[I128]),
|
||||
// https://github.com/bytecodealliance/wasmtime/issues/5526
|
||||
(Opcode::SelectSpectreGuard, &[I64, I128, I128]),
|
||||
// https://github.com/bytecodealliance/wasmtime/issues/5526
|
||||
(Opcode::SelectSpectreGuard, &[I32, I128, I128]),
|
||||
// https://github.com/bytecodealliance/wasmtime/issues/5526
|
||||
(Opcode::SelectSpectreGuard, &[I16, I128, I128]),
|
||||
// https://github.com/bytecodealliance/wasmtime/issues/5526
|
||||
(Opcode::SelectSpectreGuard, &[I8, I128, I128]),
|
||||
(Opcode::SelectSpectreGuard, &[_, I128, I128]),
|
||||
// https://github.com/bytecodealliance/wasmtime/issues/5524
|
||||
(Opcode::Select, &[I128]),
|
||||
(Opcode::Select, &[_, I128, I128]),
|
||||
// TODO
|
||||
(Opcode::BandNot, &[F32, F32]),
|
||||
(Opcode::BandNot, &[F64, F64]),
|
||||
|
||||
Reference in New Issue
Block a user