[PATCH] D21246: [InstCombine] Add rule to fold away trunc of partial load
Anna Thomas via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 23 06:55:09 PDT 2016
anna updated this revision to Diff 61669.
anna marked 3 inline comments as done.
anna added a comment.
Added check in `visitTrunc` to confirm the load is non-volatile (volatile loads have target dependent results, and I'm not sure if it will affect any targets) and if the load is `atomic`, it has only a single use, which is the trunc.
Added a test case to verify trunc is not removed in the case of atomic load with more than one use.
http://reviews.llvm.org/D21246
Files:
include/llvm/Analysis/Loads.h
lib/Analysis/Loads.cpp
lib/Transforms/InstCombine/InstCombineCasts.cpp
test/Transforms/InstCombine/trunc.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21246.61669.patch
Type: text/x-patch
Size: 12118 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160623/4b54ff49/attachment.bin>
More information about the llvm-commits
mailing list