[llvm-bugs] [Bug 38986] Poor code generation for masked scalar store
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Sep 27 17:25:18 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=38986
listmail at philipreames.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |---
--- Comment #4 from listmail at philipreames.com ---
Having said that... I went and wrote another handful of tests and hit another
problem. Note that this is with a stale build so it's possible the fixes you
landed already got this.
declare void @llvm.masked.store.v1i32.p0v1i32 (<1 x i32>, <1 x i32>*, i32, <1 x
i1>)
define void @test(i1 %c, i32* %p, i32 %v) {
%vc = insertelement <1 x i1> undef, i1 %c, i32 0
%vp = bitcast i32* %p to <1 x i32>*
%vvec = insertelement <1 x i32> undef, i32 %v, i32 0
call void @llvm.masked.store.v1i32.p0v1i32 (<1 x i32> %vvec, <1 x i32>* %vp,
i32 4, <1 x i1> %vc)
ret void
}
define void @test2(i1 %c, i32* %p, i32 %v) {
br i1 %c, label %taken, label %untaken
taken:
store i32 %v, i32* %p
ret void
untaken:
ret void
}
.text
.file "<stdin>"
.globl test # -- Begin function test
.p2align 4, 0x90
.type test, at function
test: # @test
.cfi_startproc
# %bb.0:
testb $1, %dil
jne .LBB0_1
# %bb.2: # %else
retq # <<-- NOTE THE DUPLICATE RETURN
.LBB0_1: # %cond.store
movl %edx, (%rsi)
retq
.Lfunc_end0:
.size test, .Lfunc_end0-test
.cfi_endproc
# -- End function
.globl test2 # -- Begin function test2
.p2align 4, 0x90
.type test2, at function
test2: # @test2
.cfi_startproc
# %bb.0:
testb $1, %dil
je .LBB1_2
# %bb.1: # %taken
movl %edx, (%rsi)
.LBB1_2: # %untaken
retq
.Lfunc_end1:
.size test2, .Lfunc_end1-test2
.cfi_endproc
# -- End function
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180928/a310f504/attachment.html>
More information about the llvm-bugs
mailing list