@@ -185,6 +185,14 @@ get_op_name(enum LL_Op op)
185185 return " cmpxchg" ;
186186 case LL_EXTRACTVALUE:
187187 return " extractvalue" ;
188+ case LL_INSERTVALUE:
189+ return " insertvalue" ;
190+ case LL_EXTRACTELEM:
191+ return " extractelement" ;
192+ case LL_INSERTELEM:
193+ return " insertelement" ;
194+ case LL_FNEG:
195+ return " fneg" ;
188196 default :
189197 return " thisisnotacceptable" ;
190198 }
@@ -450,6 +458,23 @@ ll_write_instruction(FILE *out, LL_Instruction *inst, LL_Module *module, int no_
450458 inst->operands [1 ]->type_struct ->str , inst->operands [1 ]->data ,
451459 inst->operands [2 ]->data );
452460 } break ;
461+ case LL_INSERTVALUE: {
462+ fprintf (out, " %s%s = %s %s %s, %s %s, %s" , SPACES, inst->operands [0 ]->data , opname,
463+ inst->operands [1 ]->type_struct ->str , inst->operands [1 ]->data ,
464+ inst->operands [2 ]->type_struct ->str , inst->operands [2 ]->data ,
465+ inst->operands [3 ]->data );
466+ } break ;
467+ case LL_EXTRACTELEM: {
468+ fprintf (out, " %s%s = %s %s %s, %s %s" , SPACES, inst->operands [0 ]->data , opname,
469+ inst->operands [1 ]->type_struct ->str , inst->operands [1 ]->data ,
470+ inst->operands [2 ]->type_struct ->str , inst->operands [2 ]->data );
471+ } break ;
472+ case LL_INSERTELEM: {
473+ fprintf (out, " %s%s = %s %s %s, %s %s, %s %s" , SPACES, inst->operands [0 ]->data , opname,
474+ inst->operands [1 ]->type_struct ->str , inst->operands [1 ]->data ,
475+ inst->operands [2 ]->type_struct ->str , inst->operands [2 ]->data ,
476+ inst->operands [3 ]->type_struct ->str , inst->operands [3 ]->data );
477+ } break ;
453478 case LL_ADD:
454479 case LL_FADD:
455480 case LL_SUB:
@@ -472,6 +497,11 @@ ll_write_instruction(FILE *out, LL_Instruction *inst, LL_Module *module, int no_
472497 inst->operands [1 ]->type_struct ->str , inst->operands [1 ]->data ,
473498 inst->operands [2 ]->data );
474499 break ;
500+ case LL_FNEG:
501+ /* unary ops */
502+ fprintf (out, " %s%s = %s %s %s" , SPACES, inst->operands [0 ]->data , opname,
503+ inst->operands [1 ]->type_struct ->str , inst->operands [1 ]->data );
504+ break ;
475505 case LL_STORE:
476506 render_store (out, inst);
477507 break ;
0 commit comments