llvm-6502/test
David Majnemer 594e4a1dd3 InstSimplify: Simplify trivial pointer expressions like b + (e - b)
consider:
long long *f(long long *b, long long *e) {
  return b + (e - b);
}

we would lower this to something like:
define i64* @f(i64* %b, i64* %e) {
  %1 = ptrtoint i64* %e to i64
  %2 = ptrtoint i64* %b to i64
  %3 = sub i64 %1, %2
  %4 = ashr exact i64 %3, 3
  %5 = getelementptr inbounds i64* %b, i64 %4
  ret i64* %5
}

This should fold away to just 'e'.

N.B.  This adds m_SpecificInt as a convenient way to match against a
particular 64-bit integer when using LLVM's match interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216439 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-26 05:55:16 +00:00
..
Analysis
Assembler Declare that musttail calls in variadic functions forward the ellipsis 2014-08-26 00:33:28 +00:00
Bindings
Bitcode
BugPoint
CodeGen [AArch32] Add patterns for VCVT{A,N,P,M}. 2014-08-25 16:56:33 +00:00
DebugInfo Use DILexicalBlockFile, rather than DILexicalBlock, to track discriminator changes to ensure discriminator changes don't introduce new DWARF DW_TAG_lexical_blocks. 2014-08-21 22:45:21 +00:00
ExecutionEngine
Feature
FileCheck
Instrumentation [dfsan] Fix non-determinism bug in non-zero label check annotator. 2014-08-22 01:18:18 +00:00
Integer
JitListener
Linker
LTO
MC [SKX] avx512_icmp_packed multiclass extension 2014-08-25 14:49:34 +00:00
Object
Other
TableGen
tools llvm-cov: test: add xfail for the big-endian buildbots 2014-08-23 00:47:24 +00:00
Transforms InstSimplify: Simplify trivial pointer expressions like b + (e - b) 2014-08-26 05:55:16 +00:00
Unit
Verifier
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg
lit.site.cfg.in
Makefile
Makefile.tests
TestRunner.sh