https://bugs.kde.org/show_bug.cgi?id=506211
Bug ID: 506211 Summary: Constant folding improvements Classification: Developer tools Product: valgrind Version First unspecified Reported In: Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: vex Assignee: jsew...@acm.org Reporter: flo2...@eich-krohm.de Target Milestone: --- Created attachment 182684 --> https://bugs.kde.org/attachment.cgi?id=182684&action=edit audit of constant folding and algebraic simplification Are there missed constant folding opportunities in VEX ir_opt.c? Yes. Attached is a spreadsheet that shows the status of constant folding and algebraic simplification for IROps that have integer operands and results. Function fold_Expr_WRK is the work horse. There are also fold_IRExpr_Binop and fold_IRExpr_Unop. I did not look at those. Here's the plan: 1) Write iropt-test similar to vbit-test using the IR injection machinery to verify that constant folding works as expected. 2) Verify existing constant folding :) 3) Fill in the constant folding gaps running iropt-test alongside. 4) Explore whether IR injection can be extended to allow symbolic verification of algebraic simplifications. E.g. verify that Iop_And32(x, 0) --> x without assigning selected constants to x thereby transforming the issue to constant folding (and having only partial coverage). Current status: initial version of iropt-test verified that constant folding for Iop_Not8 works :) -- You are receiving this mail because: You are watching all bug changes.