aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
diff options
context:
space:
mode:
authorPhilip Reames <preames@rivosinc.com>2022-06-16 08:00:05 -0700
committerPhilip Reames <listmail@philipreames.com>2022-06-16 08:01:27 -0700
commit4a3e46115a7feae955e26b537efd3de07dd88060 (patch)
treed0a4dfee4981302d190e15739f6425052864da78 /llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
parent2320a4ae907fd0006389d3176e1b9fdbf891b729 (diff)
downloadllvm-4a3e46115a7feae955e26b537efd3de07dd88060.zip
llvm-4a3e46115a7feae955e26b537efd3de07dd88060.tar.gz
llvm-4a3e46115a7feae955e26b537efd3de07dd88060.tar.bz2
[RISCV] Extend demanded field transform in InsertVSETVLI to VTYPE subfeilds
The motivating case, and the only one actually enabled by this patch, is a load or store followed by another op with the same SEW/LMUL ratio. As an example, consider: define void @test1(ptr %in, ptr %out) { entry: %0 = load <8 x i16>, ptr %in, align 2 %1 = sext <8 x i16> %0 to <8 x i32> store <8 x i32> %1, ptr %out, align 4 ret void } Without this patch, we get: vsetivli zero, 8, e16, mf4, ta, mu vle16.v v8, (a0) vsetvli zero, zero, e32, mf2, ta, mu vsext.vf2 v9, v8 vse32.v v9, (a1) ret Whereas with the patch we get: vsetivli zero, 8, e32, mf2, ta, mu vle16.v v8, (a0) vsext.vf2 v9, v8 vse32.v v9, (a1) ret We have rewritten the first vsetvli and thus removed the second one. As is strongly hinted by the code structure and todos, I am planning on communing this with all (or most all?) of the cases from isCompatible used in the forward data flow. This will be done in a series of following changes - some NFC reworks, and some reviewed optimization extensions. Differential Revision: https://reviews.llvm.org/D127780
Diffstat (limited to 'llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp')
0 files changed, 0 insertions, 0 deletions