diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-12-07 01:23:38 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-12-07 01:23:38 -0500 |
| commit | 0ad580f001eb151d0feb7ad884e237b237220800 (patch) | |
| tree | 79eee5e187dfb183113187d88360446941cc3791 /src/ir_print.cpp | |
| parent | 5e4ee659a6796f7cc327c5e1cf1e10b1c032e85e (diff) | |
| download | zig-0ad580f001eb151d0feb7ad884e237b237220800.tar.gz zig-0ad580f001eb151d0feb7ad884e237b237220800.zip | |
IR: add minValue, maxValue, and negation
Diffstat (limited to 'src/ir_print.cpp')
| -rw-r--r-- | src/ir_print.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp index 16a0ae3c78..8310cdf636 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -658,6 +658,18 @@ static void ir_print_ref(IrPrint *irp, IrInstructionRef *instruction) { ir_print_other_instruction(irp, instruction->value); } +static void ir_print_min_value(IrPrint *irp, IrInstructionMinValue *instruction) { + fprintf(irp->f, "@minValue("); + ir_print_other_instruction(irp, instruction->value); + fprintf(irp->f, ")"); +} + +static void ir_print_max_value(IrPrint *irp, IrInstructionMaxValue *instruction) { + fprintf(irp->f, "@maxValue("); + ir_print_other_instruction(irp, instruction->value); + fprintf(irp->f, ")"); +} + static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) { ir_print_prefix(irp, instruction); switch (instruction->id) { @@ -795,6 +807,12 @@ static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) { case IrInstructionIdRef: ir_print_ref(irp, (IrInstructionRef *)instruction); break; + case IrInstructionIdMinValue: + ir_print_min_value(irp, (IrInstructionMinValue *)instruction); + break; + case IrInstructionIdMaxValue: + ir_print_max_value(irp, (IrInstructionMaxValue *)instruction); + break; } fprintf(irp->f, "\n"); } |
