[PATCH] D23614: [PPC] Generate positive FP zero using xor insn instead of loading from constant area
Hal Finkel via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 18 01:48:33 PDT 2016
hfinkel added a comment.
It does not need to be in the same commit as adds this scalar support, but we should also add a pattern to catch the vector case. For
define <2 x double> @foo() local_unnamed_addr #0 {
ret <2 x double> zeroinitializer
}
we currently also load from memory. Actually, for this case on powerpc64le, there's another opportunity as well:
addis 3, 2, .LCPI0_0 at toc@ha
addi 3, 3, .LCPI0_0 at toc@l
lxvd2x 0, 0, 3
xxswapd 34, 0
blr
Even in cases where we do need to load from memory, we should be able to fold the swap into the constant in cases where it can't otherwise be eliminated.
https://reviews.llvm.org/D23614
More information about the llvm-commits
mailing list