summaryrefslogtreecommitdiff
path: root/test/463-checker-boolean-simplifier/src/Main.java
AgeCommit message (Collapse)Author
2018-05-25ART: fix 463-checker-boolean-simplier for jvmOrion Hodson
Test: art/test/run-test --host --64 463 Test: art/test/run-test --host --64 --jvm 463 Change-Id: I9ebc0172b8f55869b48ddea07d22064d53f1cf8b
2018-05-25ART-tests: Remove DX-dependency from 463-checker-boolean-simplifier.Tamas Kenez
This test was failing with D8 because some test cases relied on DX-specific code patterns. This CL moves those test cases to smali and enables D8. Bug: 65168732 Test: art/test.py -r --host -t 463 Change-Id: I7472593eea0bd0889319f19f9b65246856ceb15f
2017-06-26test: Fix 4 checker tests to pass with javac/dxIgor Murashkin
Acts as a partial revert of commit f02c3cf66c2c24533f6da43970e7b766b2ca9938. Revert only the failing javac/dx checker tests. Update files to match new checker syntax (e.g. constant_folding_after_inling -> constant_folding$after_inlining). Add build scripts to force these tests to use javac/dx even if the platform build was using jack. Fixes following tests: * 442-checker-constant-folding * 450-checker-types * 463-checker-boolean-simplifier * 537-checker-inline-and-unverified Bug: 62950048 Bug: 36902714 Change-Id: I89dc039e3746b4b9f7d3eced43d1e0113662e812
2016-09-21Update art testsSebastien Hertz
Jack generates different code compared to the previous release so some tests need to be updated. For instance, Jack transform '!cond' into 'cond xor 1'. The test 463-checker-boolean-simplifier still tests the if/else pattern using smali. (cherry picked from commit e4d28c502486afe58a0e156b8fefb621a622cec2) Bug: 29493697 Test: lunch aosp_bullhead-userdebug && make -j32 Test: make -j32 test-art-host && make -j32 test-art-target Test: art/tools/run-jdwp-tests.sh --mode=host Change-Id: Ief8ac3e9a4bcaa35c99e57161961d630333d3b3c
2016-03-02ART: Switch Checker run-tests to JackDavid Brazdil
Bug: 25635944 Change-Id: Ic6774028025b51f54589e9625003e8f69cf39dea
2016-01-28ART: Implement HSelectDavid Brazdil
This patch adds a new HIR instruction to Optimizing. HSelect returns one of two inputs based on the outcome of a condition. This is only initial implementation which: - defines the new instruction, - repurposes BooleanSimplifier to emit it, - extends InstructionSimplifier to statically resolve it, - updates existing code and tests accordingly. Code generators currently emit fallback if/then/else code and will be updated in follow-up CLs to use platform-specific conditional moves when possible. Change-Id: Ib61b17146487ebe6b55350c2b589f0b971dcaaee
2015-07-27Cosmetic changes in ART run-tests.Roland Levillain
Perform a copyright headers clean up mostly. Change-Id: I26c855b2f54d0887676d9b9b8281b14b7978ab29
2015-07-16ART: Boolean simplifier fixSerguei Katkov
Boolean simplifier should not remove condition instruction if it has side effects. Change-Id: I108b69ec05a49e5543ee956ad9c691b52179cf6c Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
2015-05-28ART: Distinguish Checker lines from commentsDavid Brazdil
In order to prevent tests passing due to lines with hard-to-spot formatting errors begin ignored, e.g. by forgetting the colon after "//CHECK", Checker will now require its assertions to start with "///" or "##", respectivelly for Java and Smali. Such lines will never be ignored and will fail the test unless successfully parsed. Change-Id: I0da9a8f13eb96d950af8c85df17d1899a853a299
2015-05-15ART: Print C1vis lists as [v1,...,vN]David Brazdil
Checker interprets whitespace as a don't-care placeholder, making it easier to write assertions which test only parts of the output (e.g. "//CHECK: Add liveness:44" does not test the inputs or any other attributes apart from "liveness"). However, since the GraphVisualizer prints lists with elements separated by spaces ("[ v1 ... vN ]"), this allows for false positives caused by an occurrence elsewhere in the output. For example, the assertion: "//CHECK: [ x y ]" will match "[ x y ]" but also "[ x a y b ]" or even "[ x ] abc [ y ]". Switching to comma-separated lists works around this issue. This patch updates all test files, fixes one false positive that this change revealed (test 442, line 337) and two occurrences of a wrong match (test 462, lines 121, 149). Bug: 21189305 Change-Id: I3b22503be3d92529dac0b13f66bccbcfabea6721
2015-05-15ART: Change Checker syntax for variablesDavid Brazdil
This patch changes the syntax for defining and referencing variables from square brackets '[[VAR]]' to angle brackets '<<VAR>>'. This is done in order to avoid clashes when matching against lists enclosed in square brackets. Change-Id: Ib9560b07bdc7bd641fd1eb6143c0063e0783f1eb
2015-04-27ART: Simplify Ifs with BooleanNot conditionDavid Brazdil
If statements with negated condition can be simplified by removing the negation and swapping the true and false branches. Change-Id: I197afbc79fb7344d73b7b85d3611e7ca2519717f
2015-04-20ART: Simplify more bool operationsDavid Brazdil
Now that we have the HBooleanNot instruction, the instruction simplifier can optimize out more conditions comparing a boolean against a constant, as well as sequences of Boolean negations. Change-Id: I7f634f6428a3984dd97b27b3d6362491346f1ff6
2015-03-25ART: Formatting and comments in BooleanSimplifierDavid Brazdil
Change-Id: I9a5aa3f2aa8b0a29d7b0f1e5e247397cf8e9e379
2015-03-24ART: Boolean simplifierDavid Brazdil
The optimization recognizes the negation pattern generated by 'javac' and replaces it with a single condition. To this end, boolean values are now consistently assumed to be represented by an integer. This is a first optimization which deletes blocks from the HGraph and does so by replacing the corresponding entries with null. Hence, existing code can continue indexing the list of blocks with the block ID, but must check for null when iterating over the list. Change-Id: I7779da69cfa925c6521938ad0bcc11bc52335583