[PATCH] D45079: [PowerPC] allow D-form VSX load/store when accessing FrameIndex without offset
Hiroshi Inoue via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 4 23:06:29 PDT 2018
inouehrs marked an inline comment as done.
inouehrs added a comment.
Even the offset to the stack object is zero, the offset to stack pointer (`$x1`) is not zero. So we do not have `li 4, 0` before `stxvx`, but we have something like `addi 4, 1, 32`.
For example, after the instruction selection without this patch, generated code for `int a[12] = {0};` looks like:
%1:g8rc = ADDI8 %stack.0.a, 0
STXVX %0:vsrc, $zero8, %1:g8rc :: (store 16 into %ir.0)
STXV %0:vsrc, 32, %stack.0.a :: (store 16 into %ir.0 + 32)
STXV %0:vsrc, 16, %stack.0.a :: (store 16 into %ir.0 + 16)
Then `%stack.0.a` is resolved in Prologue/Epilogue Insertion & Frame Finalization pass and the code become
renamable $x3 = ADDI8 $x1, 32
STXVX renamable $vsl0, $zero8, renamable $x3 :: (store 16 into %ir.0)
STXV renamable $vsl0, 64, $x1 :: (store 16 into %ir.0 + 32)
STXV killed renamable $vsl0, 48, $x1 :: (store 16 into %ir.0 + 16)
https://reviews.llvm.org/D45079
More information about the llvm-commits
mailing list