llvm-6502/test
Chris Lattner b20c0b5092 Enhance the "compare with shift" and "compare with div"
optimizations to be much more aggressive in the face of
exact/nsw/nuw div and shifts.  For example, these (which
are the same except the first is 'exact' sdiv:

define i1 @sdiv_icmp4_exact(i64 %X) nounwind {
  %A = sdiv exact i64 %X, -5   ; X/-5 == 0 --> x == 0
  %B = icmp eq i64 %A, 0
  ret i1 %B
}

define i1 @sdiv_icmp4(i64 %X) nounwind {
  %A = sdiv i64 %X, -5   ; X/-5 == 0 --> x == 0
  %B = icmp eq i64 %A, 0
  ret i1 %B
}

compile down to:

define i1 @sdiv_icmp4_exact(i64 %X) nounwind {
  %1 = icmp eq i64 %X, 0
  ret i1 %1
}

define i1 @sdiv_icmp4(i64 %X) nounwind {
  %X.off = add i64 %X, 4
  %1 = icmp ult i64 %X.off, 9
  ret i1 %1
}

This happens when you do something like:
  (ptr1-ptr2) == 42

where the pointers are pointers to non-unit types.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125266 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-10 05:23:05 +00:00
..
Analysis Add another rdar number. 2011-01-24 17:54:01 +00:00
Archive Revert test/Archive/check_binary_output.ll". It fails on a buildbot. 2010-12-07 05:57:02 +00:00
Assembler implement .ll and .bc support for nsw/nuw on shl and exact on lshr/ashr. 2011-02-07 16:40:21 +00:00
Bindings/Ocaml XFAIL vg_leak the new test as the rest. 2010-12-23 21:22:09 +00:00
Bitcode Testcase for PR8494 (invalid bitcode crashing the bitcode reader). 2010-10-28 15:57:30 +00:00
BugPoint test: Check the feature 'loadable_module' with load modules in %llvmshlibdir. 2010-11-29 07:58:32 +00:00
CodeGen After 3-addressifying a two-address instruction, update the register maps; add a missing check when considering whether it's profitable to commute. rdar://8977508. 2011-02-10 02:20:55 +00:00
DebugInfo Hide tests, that check .loc, .file in output assembly, from darwin9 buildbot. 2010-12-02 23:29:58 +00:00
ExecutionEngine XFAIL for now. If someone with access to an ARM/Linux host wants to have a look 2010-12-02 20:20:32 +00:00
Feature test: Check the feature 'loadable_module' with load modules in %llvmshlibdir. 2010-11-29 07:58:32 +00:00
FrontendAda Testcase for dragonegg commit 124128. 2011-01-24 18:04:33 +00:00
FrontendC Update llvm-gcc's tests. 2011-01-14 17:01:20 +00:00
FrontendC++ remove a small scattering of basically pointless tests. These are 2011-02-09 16:41:31 +00:00
FrontendFortran Use -S rather than -c for the benefit of dragonegg. 2010-11-25 21:41:35 +00:00
FrontendObjC Update tests to accomodate unnamed_addr introduction. 2011-01-17 17:54:17 +00:00
FrontendObjC++ Remove explicit uses of -emit-llvm, the test infrastructure adds it 2010-11-25 21:48:20 +00:00
Integer
lib Use LLVMCC_EMITIR_FLAG rather than hard-coding "-emit-llvm". 2010-11-25 21:19:52 +00:00
Linker Correctly merge available_externally and regular definitions when they have 2011-02-01 05:33:52 +00:00
LLVMC Remove -llvmc-temp-hack from tblgen. 2010-10-23 07:32:53 +00:00
MC Do AsmMatcher operand classification per-opcode. 2011-02-10 00:08:28 +00:00
Object Revert "Object: Renable the tests now that none of the build bots complain about aliasing." 2011-01-21 06:27:04 +00:00
Other test/Other/close-stderr.ll: Require the feature 'shell'. It is not executable on Win32 but it is executable on MSYS-bash. 2010-12-07 02:43:58 +00:00
Scripts Print all 64bits for st_value and st_size. Adjust tests accordingly. 2010-12-20 20:49:43 +00:00
TableGen Rename lisp-like functions as suggested by Gabor Greif as loooong time 2011-01-07 17:05:37 +00:00
Transforms Enhance the "compare with shift" and "compare with div" 2011-02-10 05:23:05 +00:00
Unit Test: Fix Support.Path and _all_ of the unittest death tests. GetTempPath defaults to \Windows\. 2010-12-07 01:23:49 +00:00
Verifier
CMakeLists.txt macho-dump: Fix CMake build, following up to r121466. 2010-12-10 09:18:26 +00:00
lit.cfg test/lit.cfg: Seek sane tools(and bash) in directories and set to $PATH. 2011-02-09 04:19:21 +00:00
lit.site.cfg.in CMake: Add the new option LLVM_LIT_TOOLS_DIR. It can specify "Path to GnuWin32 tools". 2011-02-09 04:18:58 +00:00
Makefile test/Makefile: "check-all" should update tools/clang/test/Unit/lit.site.cfg, too. Follow up to clang r124777. 2011-02-03 07:36:02 +00:00
Makefile.tests
site.exp.in test: Use $SharedLibDir for loadable modules. On Cygming, loadable modules are not in lib/ but bin. 2010-11-29 00:20:21 +00:00
TestRunner.sh