Go to file
Max Kazantsev 37da4333a8 [SimplifyIndVars] Eliminate redundant truncs
This patch adds logic to deal with the following constructions:

  %iv = phi i64 ...
  %trunc = trunc i64 %iv to i32
  %cmp = icmp <pred> i32 %trunc, %invariant

Replacing it with
  %iv = phi i64 ...
  %cmp = icmp <pred> i64 %iv, sext/zext(%invariant)

In case if it is legal. Specifically, if `%iv` has signed comparison users, it is
required that `sext(trunc(%iv)) == %iv`, and if it has unsigned comparison
uses then we require `zext(trunc(%iv)) == %iv`. The current implementation
bails if `%trunc` has other uses than `icmp`, but in theory we can handle more
cases here (e.g. if the user of trunc is bitcast).

Differential Revision: https://reviews.llvm.org/D47928
Reviewed By: reames

llvm-svn: 335020
2018-06-19 04:48:34 +00:00
clang Update NRVO logic to support early return (Attempt 2) 2018-06-19 04:39:07 +00:00
clang-tools-extra Fix clangd test to pass when delayed template parsing is on by default 2018-06-18 18:55:10 +00:00
compiler-rt Fix bots after r334981 2018-06-19 02:56:24 +00:00
debuginfo-tests [debuginfo-tests] Always use the system python to invoke llgdb.py. 2018-06-10 19:38:26 +00:00
libclc Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
libcxx Fix libcxx tests after clang r334677. 2018-06-17 19:58:45 +00:00
libcxxabi Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
libunwind Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
lld [ELF] Uniquify --wrap list. 2018-06-18 22:32:15 +00:00
lldb Fix up Info.plist when building LLDB.framework with CMake 2018-06-19 02:59:30 +00:00
llgo Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
llvm [SimplifyIndVars] Eliminate redundant truncs 2018-06-19 04:48:34 +00:00
openmp [OpenMP] Fix formatting issues in kmp_stats.h 2018-06-08 22:27:53 +00:00
parallel-libs Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
polly Adjust for clang-format changes 2018-06-18 13:01:52 +00:00
README.md

README.md

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.