llvm-project/llvm
Daniel Neilson bdda115e19 [InstCombine] Don't blow up in foldICmpWithCastAndCast on vector icmp instructions.
Summary:
Presently, InstCombiner::foldICmpWithCastAndCast() implicitly assumes that it is
only invoked with icmp instructions of integer type. If that assumption is broken,
and it is called with an icmp of vector type, then it fails (asserts/crashes).

This patch addresses the deficiency. It allows it to simplify
icmp (ptrtoint x), (ptrtoint/c) of vector type into a compare of the inputs,
much as is done when the type is integer.

Reviewers: apilipenko, fedor.sergeev, mkazantsev, anna

Reviewed By: anna

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D44063

llvm-svn: 326730
2018-03-05 18:05:51 +00:00
..
bindings Because of CVE-2018-6574, some compiler options and linker options are restricted to prevent arbitrary code execution. 2018-02-23 20:12:24 +00:00
cmake Revert r326723: Make STATISTIC() values available programmatically 2018-03-05 17:52:43 +00:00
docs TableGen: Reimplement !foreach using the resolving mechanism 2018-03-05 15:21:04 +00:00
examples [ORC] Consolidate RTDyldObjectLinkingLayer GetMemMgr and GetResolver into a 2018-02-14 22:13:02 +00:00
include Revert r326723: Make STATISTIC() values available programmatically 2018-03-05 17:52:43 +00:00
lib [InstCombine] Don't blow up in foldICmpWithCastAndCast on vector icmp instructions. 2018-03-05 18:05:51 +00:00
projects
resources
runtimes
test [InstCombine] Don't blow up in foldICmpWithCastAndCast on vector icmp instructions. 2018-03-05 18:05:51 +00:00
tools Implementation of MRI "delete" command. 2018-03-02 23:23:48 +00:00
unittests Revert r326723: Make STATISTIC() values available programmatically 2018-03-05 17:52:43 +00:00
utils TableGen: Use DefInit::getDef() instead of the type's getRecord() 2018-03-05 14:01:30 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt build: add the ability to create a symlink for dsymutil 2018-02-28 23:00:50 +00:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.