Open abrown opened 2 years ago
cc: @fitzgen
Standalone reproducer test case:
(type FloatCC (enum))
(type Inst (enum))
(type Value (enum))
(type ValueArray2 (enum))
(decl value_array_2 (Value Value) ValueArray2)
(extern constructor value_array_2 pack_value_array_2)
(extern extractor infallible value_array_2 unpack_value_array_2)
(type ValueArray3 (enum))
(decl value_array_3 (Value Value Value) ValueArray3)
(extern constructor value_array_3 pack_value_array_3)
(extern extractor infallible value_array_3 unpack_value_array_3)
(decl inst_data (InstructionData) Inst)
(extern extractor infallible inst_data inst_data)
(type Opcode extern (enum Fcmp Select))
(type InstructionData (enum (FloatCompare (opcode Opcode) (args ValueArray2) (cond FloatCC))
(Ternary (opcode Opcode) (args ValueArray3))))
(decl def_inst (Inst) Value)
(extern extractor def_inst def_inst)
(decl fcmp (FloatCC Value Value) Inst)
(extractor
(fcmp Cond x y)
(inst_data (InstructionData.FloatCompare (Opcode.Fcmp) (value_array_2 x y) Cond)))
(decl select (Value Value Value) Inst)
(extractor
(select c x y)
(inst_data (InstructionData.Ternary (Opcode.Select) (value_array_3 c x y))))
(decl select_fcmp_flag (FloatCC) Inst)
(extractor (select_fcmp_flag comparison_flag)
(select (def_inst (fcmp comparison_flag a b)) x y))
cc @cfallin, @fitzgen
.github/subscribe-to-label.json
configuration file.
[Learn more.](https://github.com/bytecodealliance/subscribe-to-label-action)
When I create a new extractor, one to extract the comparison flag from a comparison referenced by
select
, ISLE panics.Steps to Reproduce
Add:
Then run:
Expected Results
The ISLE code to generate without failure.
Actual Results
Versions and Environment
Cranelift version or commit: latest
HEAD