InstCombine rule to fold trunc when value available
authorAnna Thomas <anna@azul.com>
Thu, 23 Jun 2016 20:22:22 +0000 (20:22 +0000)
committerAnna Thomas <anna@azul.com>
Thu, 23 Jun 2016 20:22:22 +0000 (20:22 +0000)
commit31a0b2088f37821b061ea2780e7ad804749f3647
treeba63d9293ec388b43717dcdaa5c09e5a2579cff5
parentfb780bfc35968bede8c23331a7505ac11ef2c1fb
InstCombine rule to fold trunc when value available

Summary:
This instcombine rule folds away trunc operations that have value available from a prior load or store.
This kind of code can be generated as a result of GVN widening the load or from source code as well.

Reviewers: reames, majnemer, sanjoy

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D21246

llvm-svn: 273608
llvm/include/llvm/Analysis/Loads.h
llvm/lib/Analysis/Loads.cpp
llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
llvm/test/Transforms/InstCombine/trunc.ll