[PATCH] D31068: [SDAG] Expand MergedConsecutiveStores to better handle Giving up in Chain Analysis
Aditya Nandakumar via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 11 09:55:22 PDT 2017
The test case I sent earlier is what I’m using too. The DAG right before DAGCombiner::MergeConsecutiveStores is
SelectionDAG has 47 nodes:
t0: ch = EntryToken
t2: i32,ch = CopyFromReg t0, Register:i32 %vreg2
t3: ch = ValueType:i32
t5: i32,ch = CopyFromReg t2:1, Register:i32 %vreg3
t6: i64 = build_pair t2, t5
t40: i32 = Constant<0>
t43: i32 = add t2, Constant:i32<46>
t44: i32 = add t2, Constant:i32<46>
t45: v2i16 = bitcast t44
t46: i16 = add t45, Constant:i32<1>
t47: i32 = zero_extend t46
t48: i32 = add t5, t47
t49: i64 = build_pair t43, t48
t8: i64 = add t6, Constant:i64<2>
t12: ch = store<ST1[%dst.gep2.i105.2](align=2)> t0, Constant:i8<0>, t8, undef:i64
t14: i64 = add t6, Constant:i64<3>
t15: ch = store<ST1[%dst.gep2.i105.3]> t12, Constant:i8<0>, t14, undef:i64
t17: i64 = add t6, Constant:i64<4>
t18: ch = store<ST1[%dst.gep2.i105.4](align=2)> t15, Constant:i8<0>, t17, undef:i64
t20: i64 = add t6, Constant:i64<5>
t50: ch = store<ST1[%dst.gep2.i105.5]> t0, Constant:i8<0>, t20, undef:i64
t51: ch = TokenFactor t18, t50
t22: ch = store<ST1[%dst.gep2.i105.61](align=2)> t51, Constant:i8<0>, Constant:i64<0>, undef:i64
t27: i32 = extract_element t49, Constant:i64<0>
t29: ch = CopyToReg t0, Register:i32 %vreg4, t27
t26: i32 = extract_element t49, Constant:i64<1>
t31: ch = CopyToReg t0, Register:i32 %vreg5, t26
t39: ch = TokenFactor t22, t29, t31
t36: ch = brcond t39, Constant:i1<0>, BasicBlock:ch<loop.i108Exit 0x107801c58>
t38: ch = br t36, BasicBlock:ch<loop.i108Split 0x1078018c8>
Please look at how t50 will not be merged with the current implementation.
> On Apr 11, 2017, at 5:41 AM, Nirav Dave via Phabricator <reviews at reviews.llvm.org> wrote:
>
> niravd added a comment.
>
> I'm a little concerned about the selection candidates having a chain loop dependence after mething. Can you get a llvm testcase I can look at myself. Alternatively I can probably cobble one myself if I can get a snapshot of the DAG right before the relevant merge
>
> In https://reviews.llvm.org/D31068#723192, @aditya_nandakumar wrote:
>
>> Nirav - I posted the reason for the regression and a quick fix for the issue I saw in https://reviews.llvm.org/D31914.
>
>
>
>
>
> https://reviews.llvm.org/D31068
>
>
>
More information about the llvm-commits
mailing list