aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/test
AgeCommit message (Collapse)Author
2016-05-03One more test suite for binary pattern matchingKostis Sagonas
Taken from the OTP test suites and changed accordingly for HiPE. Used to be problematic in the tests that matched against a segment of 'bad_size'. This was corrected in the BEAM compiler for OTP 19.
2016-04-19Remove unused ct_hooksSverker Eriksson
2016-03-21Merge branch 'kostis/hipe-inline-fp-crash/PR-984/OTP-13407'Sverker Eriksson
2016-03-07Comment and clean up a testKostis Sagonas
2016-03-02hipe: Fix crashing bugs when inlining FP opsMagnus Lång
It was assumed in hipe_icode_fp:filter_map/3 that either all predecessors would have an up-to-date ("assigned") tagged copy, or none of them. This is temporarily false during the fixpoint loop in basic_floats:test_icode_type_crash_2/0, which exercises the all_args_equal(Bindings) =:= true branch, that would previously erroneously end up in the 'false' branch, which is what caused the crash in that case. This is likewise only temporarily false during the fixpoint loop in basic_floats:test_icode_type_crash/0, but that case instead exercises the 'false' branch, justifying the inclusion of both tests.
2016-02-29A test that crashes the HiPE compiler when inlining FP opsKostis Sagonas
2016-02-17Makefiles: Remove test_server from include path and code pathBjörn Gustavsson
Since no test suites includede test_server.hrl, there is no need to have test_server in the include path or code path.
2016-02-17Eliminate use of test_server.hrl and test_server_line.hrlBjörn Gustavsson
As a first step to removing the test_server application as as its own separate application, change the inclusion of test_server.hrl to an inclusion of ct.hrl and remove the inclusion of test_server_line.hrl.
2016-02-02Merge branch 'margnus1/bs_unit_fix' into maintZandra
* margnus1/bs_unit_fix: hipe: Fix signed compares of unsigned sizes beam: Fix overflow bug in i_bs_add_jId hipe: Add tests for bad bit syntax float sizes Add a case testing the handling of guards involving binaries Add some more binary syntax construction tests hipe: Guard against enormous numbers in ranges hipe: Fix constructing huge binaries hipe: Fix binary constructions failing with badarith Add missing corner-case to bs_construct_SUITE hipe: Allow unsigned args in hipe_rtl_arith hipe: test unit size match in bs_put_binary_all hipe: test unit size match in bs_append Fix hipe_rtl_binary_construct:floorlog2/1 OTP-13272
2015-12-16Fix compilation of matching with UTF binariesKostis Sagonas
The code generated by the HiPE compiler for pattern matching with UTF binaries was such that sometimes THE_NON_VALUE was stored in the roots followed by the garbage collector. This was not an issue for the vanilla native code compiler, but was problematic for the ErLLVM back-end. Fix the issue by not storing THE_NON_VALUE in the live roots. An alternative fix would be to change the code of the garbage collector. With this fix, there are no more (known) failing test cases for the ErLLVM back-end (at least on x86_64 with LLVM 3.5, which is the configuation regularly tested). Thanks to @margnus1 for the fix.
2015-12-16Cleanup and add one more test caseKostis Sagonas
2015-12-16Two tests that depend on inlining being turned onKostis Sagonas
2015-12-16More tests for BIFsKostis Sagonas
2015-12-16Include some more old HiPE tests to the test suiteKostis Sagonas
2015-12-16Add tests for the is_boolean/1 guardKostis Sagonas
2015-12-16Two more tests addedKostis Sagonas
- A test for proper handling of negative numbers in binary search key tables - A test for HiPE's ICode range analysis
2015-12-16Test that apply/3 is tail recursiveKostis Sagonas
2015-12-16Three more tests addedKostis Sagonas
2015-12-16Minor cleanupKostis Sagonas
Take out extraneous spaces at the end of lines.
2015-12-16Comment out tests that are not ready for to_llvmKostis Sagonas
2015-12-16Cleanups & uncomment some codeKostis Sagonas
2015-12-16More tests for handling of UTF in bitstringsKostis Sagonas
2015-12-16Minor code cleanupKostis Sagonas
2015-12-16Add more generated test suites in MakefileKostis Sagonas
2015-12-16Use function from hipe module instead of a local oneKostis Sagonas
2015-12-16Add function to prevent running tests in the LLVM backendKostis Sagonas
2015-12-16More basic testsKostis Sagonas
and some tests that the HiPE compiler is not causing trouble
2015-12-16First part of the basic test suite for the HiPE compilerKostis Sagonas
2015-12-02hipe: Fix signed compares of unsigned sizesMagnus Lång
Also, some of the branches were testing sizes in bits against a constant ?MAX_BINSIZE, which was in bytes. The signed comparisons masked this mistake. These branches have been removed since all sizes in bits that fit in a machine word are valid binary sizes. Finally, a test that reproduces the issue was added to bs_construct, along with a test for one of the cases (bs_init<0>(...)) when the test against ?MAX_BINSIZE must be changed to unsigned rather than removed.
2015-11-30hipe: Add tests for bad bit syntax float sizesMagnus Lång
2015-11-27Add a case testing the handling of guards involving binariesKostis Sagonas
The HiPE compiler was leaking exceptions out of guards involving binaries with `strange' arithmetic in them. Fixed by the set of changes in this pull request.
2015-11-27Add some more binary syntax construction testsKostis Sagonas
Some more cases (taken from the BEAM bs_construct suite) that used to show different behaviour than BEAM when compiled to native code were included in the appropriate test file of the HiPE test suite.
2015-11-09Merge branch 'kostis/hipe-bs-match-huge-bin' into maintHenrik Nord
* kostis/hipe-bs-match-huge-bin: Fix matching with huge binaries Compile without errors for exported variables OTP-13092
2015-10-12Fix edge case of Size = 0 in bs_put_integerKostis Sagonas
copy_offset_int_big was assuming (Offset + Size - 1) (Tmp9 in the first BB) would not underflow. It was also unconditionally reading and writing the binary even when Size was zero, unlike copy_int_little, which is the only other case of bs_put_integer that does not have a short-circuit on Size = 0. This was causing segfaults when constructing binaries starting with a zero-length integer field, because a logical right shift was used to compute an offset in bytes (which became 0x1fffffffffffffff) to read in the binary. Tests, taken from the emulator bs_construct_SUITE, were also added. The complete credit for the report and the fix goes to Magnus Lång.
2015-10-02Fix matching with huge binariesKostis Sagonas
In certain cases of matching with very big binaries, the HiPE compiler generated code that would fail the match, even in cases that the matching was successful. The problem was more quite noticeable on 32-bit platforms where certain integer quantities would be represented as bignums. Brief summary of changes: * gen_rtl({bs_skip_bits, ...}, ...) could not handle too large constants. Previously the constants were truncated to word size. * hipe_rtl_binary_match:make_size/3 erroneously assumed that the output of first_part/3 would not overflow when multiplied by 8, which is no longer true. To maintain full performance, the overflow test is only performed when BitsVar was a bignum. Thus, the fast path is identical to before. * hipe_rtl_binary_match:set_high/2 was assuming that only bits below bit 27 were ever set in arguments to bs_skip_bits, which is not only false when the arguments are bignums, but also on 64-bit platforms. The commit includes a test taken from the bs_match_bin_SUITE. Most of the credit for finding these HiPE compiler errors and for creating appropriate fixes for them should go to Magnus Lång.
2015-06-18Change license text to APLv2Bruce Yinhe
2015-05-06Merge branch 'sverk/hipe_match_wbin/OTP-12667'Sverker Eriksson
* sverk/hipe_match_wbin/OTP-12667: erts: Add debug assertions for match state sanity hipe: Add test for matching of writable binary erts,hipe: Optimize away calls to emasculate_binary erts,hipe: Fix bug in binary matching of writable binary Conflicts: erts/emulator/hipe/hipe_bif0.c
2015-04-29hipe: Add test for matching of writable binarySverker Eriksson
2015-04-15Raise more descriptive error messages for failed map operationsBjörn Gustavsson
According to EEP-43 for maps, a 'badmap' exception should be generated when an attempt is made to update non-map term such as: <<>>#{a=>42} That was not implemented in the OTP 17. José Valim suggested that we should take the opportunity to improve the errors coming from map operations: http://erlang.org/pipermail/erlang-questions/2015-February/083588.html This commit implement better errors from map operations similar to his suggestion. When a map update operation (Map#{...}) or a BIF that expects a map is given a non-map term, the exception will be: {badmap,Term} This kind of exception is similar to the {badfun,Term} exception from operations that expect a fun. When a map operation requires a key that is not present in a map, the following exception will be raised: {badkey,Key} José Valim suggested that the exception should be {badkey,Key,Map}. We decided not to do that because the map could potentially be huge and cause problems if the error propagated through links to other processes. For BIFs, it could be argued that the exceptions could be simply 'badmap' and 'badkey', because the bad map and bad key can be found in the argument list for the BIF in the stack backtrace. However, for the map update operation (Map#{...}), the bad map or bad key will not be included in the stack backtrace, so that information must be included in the exception reason itself. For consistency, the BIFs should raise the same exceptions as update operation. If more than one key is missing, it is undefined which of keys that will be reported in the {badkey,Key} exception.
2015-03-13hipe: Fix maps sort order testcaseBjörn-Egil Dahlberg
2014-04-29Add five new test files for maps in the HiPE test suiteKostis Sagonas
2014-04-29Copy the tests for maps from the compiler application to a new HiPE test suiteMagnus Lång
Change the maps_guard_fun test to accept the HiPE trace format.
2014-03-23Add support for testing the LLVM backend tooKostis Sagonas
2014-03-23Ensure generated modules are properly included in the EmakefileKostis Sagonas
2014-02-24Up the time limit (globally) for some slow machinesKostis Sagonas
2014-02-24Add check so that tests are skipped if HiPE is not availableKostis Sagonas
2014-02-24Add a Makefile for the HiPE testsKostis Sagonas
2014-02-24Add tests for the HiPE compiler (Part 1: binaries and bitstrings)Kostis Sagonas
Create tests for the HiPE native code compiler. This is the first part of the effort and contains tests that check that the native code produced by the HiPE compiler for binaries and bitstrings is OK and behaves similarly to the code produced by the BEAM compiler.
2014-02-24Disable hipe_SUITE when environment doesn't support itTobias Schlager
2014-02-24Make hipe non-upgradable by setting appup file emptyTobias Schlager
The reason for this is that if you are running a system with native compiled code, then you will have major problems with soft upgrade and the only reasonable way to go is to restart your emulator. Currently there is no instruction that will force ONLY a restart of the emulator, so the solution would be to hand write a relup with only a restart_emulator instruction. By letting hipe.appup be empty, systools will complain and not generate a relup - which should indicate that you might have to write your relup by hand.