[PATCH] D27395: Fixed store operation for a vector of i1.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 5 13:01:53 PST 2016
efriedma added a comment.
You don't need load-modify-store for an unmasked store; we're allowed to clobber the padding bits, so you can do something like this:
define void @store_vec_i1(<2 x i1>* %p, <2 x i1> %val) {
; following is equivalent to `store <2 x i1> %val, <2 x i1>* %p`
%a0 = extractelement <2 x i1> val, i32 0
%r0 = zext i1 %v1 to i8
%a1 = extractelement <2 x i1> val, i32 1
%b1 = zext i1 %v1 to i8
%c1 = shl i8 %b1, 1
%r1 = or i1 %r0, %c1
%p1 = bitcast <2 x i1>* %p to i8*
store i8 %r1, i8* %p1
}
Repository:
rL LLVM
https://reviews.llvm.org/D27395
More information about the llvm-commits
mailing list