[PATCH] D78568: [DAGCombine] Fix bug in load scalarization
Fraser Cormack via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 26 02:56:41 PDT 2020
frasercrmck added a comment.
In D78568#2350310 <https://reviews.llvm.org/D78568#2350310>, @foad wrote:
> In D78568#2350291 <https://reviews.llvm.org/D78568#2350291>, @frasercrmck wrote:
>
>> In D78568#2349707 <https://reviews.llvm.org/D78568#2349707>, @foad wrote:
>>
>>> Looks good to me. You could pre-commit the test case and rebase this diff so we can see the effect on codegen.
>>
>> Sure, I can do that. Is committing a test that "expects" incorrect codegen the done thing?
>
> Yes, especially if it's only temporary and the checks are generated.
Okay, great. The test is currently generated as:
define i1 @extractloadi1(<8 x i1> *%ptr, i32 %idx) {
; CHECK-LABEL: extractloadi1:
; CHECK: ; %bb.0:
; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; CHECK-NEXT: v_mad_u64_u32 v[0:1], s[4:5], v2, 1, v[0:1]
; CHECK-NEXT: flat_load_ubyte v0, v[0:1]
; CHECK-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
; CHECK-NEXT: s_setpc_b64 s[30:31]
%val = load <8 x i1>, <8 x i1> *%ptr
%ret = extractelement <8 x i1> %val, i32 %idx
ret i1 %ret
}
I believe this shows the incorrect codegen.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78568/new/
https://reviews.llvm.org/D78568
More information about the llvm-commits
mailing list