[PATCH] D76983: [InstCombine] Transform extractelement-trunc -> bitcast-extractelement
Daan Sprenkels via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 28 05:23:19 PDT 2020
dsprenkels created this revision.
dsprenkels added reviewers: RKSimon, spatel.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
dsprenkels added a comment.
It was a bit unclear to me how involved the tests should be for this patch. At this time, I kept them pretty minimal, but I could add more if that's desired.
Canonicalize the case when a scalar extracted from a vector is
truncated. Transform such cases to bitcast-then-extractelement.
This will enable erasing the truncate operation.
This commit fixes PR45314.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D76983
Files:
llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
llvm/test/Transforms/InstCombine/pr45314_be.ll
llvm/test/Transforms/InstCombine/pr45314_le.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76983.253329.patch
Type: text/x-patch
Size: 7181 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200328/a1e12e0d/attachment-0001.bin>
More information about the llvm-commits
mailing list