diff options
author | Sanjay Patel <spatel@rotateright.com> | 2022-11-24 12:56:19 -0500 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2022-11-24 13:27:19 -0500 |
commit | 535c5d56a7bc9966036a11362d8984983a4bf090 (patch) | |
tree | 6ce751bc42ca0edaa557802fa9bfafad09ddf58b /flang/lib/Frontend/CompilerInvocation.cpp | |
parent | 5cf75ecf04ceceab6c8434f5cec5652915d6b419 (diff) | |
download | llvm-535c5d56a7bc9966036a11362d8984983a4bf090.zip llvm-535c5d56a7bc9966036a11362d8984983a4bf090.tar.gz llvm-535c5d56a7bc9966036a11362d8984983a4bf090.tar.bz2 |
[InstCombine] ease restriction for extractelt (bitcast X) fold
We were checking for a desirable integer type even when there
is no shift in the transform. This is unnecessary since we
are truncating directly to the destination type.
This removes an extractelt in more cases and seems to make the
canonicalization more uniform overall. There's still a potential
difference between patterns that need a shift vs. trunc-only.
I'm not sure if that is worth keeping at this point, but it can
be adjusted in another step (assuming this change does not cause
trouble).
In the most basic case where I noticed this, we missed a fold
that would have completely removed vector ops from a pattern
like:
https://alive2.llvm.org/ce/z/y4Qdte
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions