[PATCH] D107068: [DAG] DAGCombiner::visitVECTOR_SHUFFLE - recognise INSERT_SUBVECTOR patterns.
Sterling Augustine via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 5 17:12:07 PDT 2021
saugustine added a comment.
I have tracked down an assertion failure in a Halide pipeline that targets armeabi-v7a to this change. I don't think it is Halide per-se, but rather codegen that happens to be exposed by this pipeline. I'm working on extracting it. My sense is that this target needs work similar to the others, but to get started, here is the assertion:
LLVM ERROR: Cannot select: 0x47547d4f7820: v4f32 = insert_subvector 0x47547d8b43a8, 0x47547d8b6000, Constant:i32<0>
0x47547d8b43a8: v4f32 = fmul nnan ninf nsz contract afn reassoc 0x47547d8b6068, 0x47547d8b6d00
0x47547d8b6068: v4f32 = ARMISD::VDUP 0x47547d8b6478
0x47547d8b6478: f32 = fsub nnan ninf nsz contract afn reassoc 0x47547d8ba958, 0x47547d8b64e0
0x47547d8ba958: f32 = fdiv nnan ninf nsz contract afn reassoc 0x47547d8ba270, 0x47547d8ba208
0x47547d8ba270: f32 = fsub nnan ninf nsz contract afn reassoc 0x47547d8baa28, 0x47547d8b4000
0x47547d8baa28: f32,ch = load<(load (s32) from %ir.scevgep907908, !tbaa !48)> 0x47547fd271e8, 0x47547d8ba2d8, undef:i32
0x47547d8ba2d8: i32 = add 0x47547d4d8888, 0x47547d8baa90
0x47547d4d8888: i32,ch = CopyFromReg 0x47547fd271e8, Register:i32 %278
0x47547da92bc8: i32 = Register %278
0x47547d8baa90: i32,ch = CopyFromReg 0x47547fd271e8, Register:i32 %199
0x47547d8ba340: i32 = Register %199
0x47547d7e0f08: i32 = undef
0x47547d8b4000: f32 = fadd nnan ninf nsz contract afn reassoc 0x47547d8b68f0, 0x47547d8b6888
0x47547d8b68f0: f32,ch = load<(load (s32) from %ir.lsr.iv902906, !tbaa !48)> 0x47547fd271e8, 0x47547d4d8888, undef:i32
0x47547d4d8888: i32,ch = CopyFromReg 0x47547fd271e8, Register:i32 %278
0x47547da92bc8: i32 = Register %278
0x47547d7e0f08: i32 = undef
0x47547d8b6888: f32,ch = CopyFromReg 0x47547fd271e8, Register:f32 %1015
0x47547d8b4068: f32 = Register %1015
0x47547d8ba208: f32,ch = CopyFromReg 0x47547fd271e8, Register:f32 %1016
0x47547d8ba9c0: f32 = Register %1016
0x47547d8b64e0: f32 = sint_to_fp 0x47547d8b6f70
0x47547d8b6f70: i32 = fp_to_sint 0x47547d4e53a8
0x47547d4e53a8: f32 = bitcast 0x47547d4d86e8
0x47547d4d86e8: i32,ch,glue = CopyFromReg 0x47547d7d6bc8, Register:i32 $r0, 0x47547d7d6bc8:1
0x47547d8bae38: i32 = Register $r0
0x47547d7d6bc8: ch,glue = callseq_end 0x47547d4e5750, TargetConstant:i32<0>, TargetConstant:i32<-1>, 0x47547d4e5750:1
0x47547d8bc820: i32 = TargetConstant<0>
0x47547d8b8ea0: i32 = TargetConstant<-1>
0x47547d4e5750: ch,glue = ARMISD::CALL 0x47547d7d60d0, TargetExternalSymbol:i32'floorf', Register:i32 $r0, RegisterMask:Untyped, 0x47547d7d60d0:1
0x47547d8b6d00: v4f32 = ARMISD::BUILD_VECTOR undef:f32, undef:f32, 0x47547d8bad68, 0x47547d8ba618
0x47547d8bca90: f32 = undef
0x47547d8bca90: f32 = undef
0x47547d8bad68: f32 = fsub nnan ninf nsz contract afn reassoc ConstantFP:f32<1.000000e+00>, 0x47547d8ba618
0x47547d8bac98: f32 = ConstantFP<1.000000e+00>
0x47547d8ba618: f32 = fsub nnan ninf nsz contract afn reassoc 0x47547d8b6750, 0x47547d8bcea0
0x47547d8b6750: f32 = fdiv nnan ninf nsz contract afn reassoc 0x47547d8ba888, 0x47547d8ba208
0x47547d8ba888: f32 = fsub nnan ninf nsz contract afn reassoc 0x47547d8baa28, 0x47547d8ba138
0x47547d8baa28: f32,ch = load<(load (s32) from %ir.scevgep907908, !tbaa !48)> 0x47547fd271e8, 0x47547d8ba2d8, undef:i32
0x47547d8ba2d8: i32 = add 0x47547d4d8888, 0x47547d8baa90
0x47547d4d8888: i32,ch = CopyFromReg 0x47547fd271e8, Register:i32 %278
0x47547d8baa90: i32,ch = CopyFromReg 0x47547fd271e8, Register:i32 %199
0x47547d7e0f08: i32 = undef
0x47547d8ba138: f32 = fadd nnan ninf nsz contract afn reassoc 0x47547d8ba8f0, 0x47547d8b6888
0x47547d8ba8f0: f32,ch = load<(load (s32) from %ir.scevgep904905, !tbaa !48)> 0x47547fd271e8, 0x47547d8ba1a0, undef:i32
0x47547d8ba1a0: i32 = add 0x47547d4d8888, 0x47547d8b6f08
0x47547d7e0f08: i32 = undef
0x47547d8b6888: f32,ch = CopyFromReg 0x47547fd271e8, Register:f32 %1015
0x47547d8b4068: f32 = Register %1015
0x47547d8ba208: f32,ch = CopyFromReg 0x47547fd271e8, Register:f32 %1016
0x47547d8ba9c0: f32 = Register %1016
0x47547d8bcea0: f32 = sint_to_fp 0x47547d8b66e8
0x47547d8b66e8: i32 = fp_to_sint 0x47547d6d02d8
0x47547d6d02d8: f32 = bitcast 0x47547d8b8f70
0x47547d8b8f70: i32,ch,glue = CopyFromReg 0x47547d8b8f08, Register:i32 $r0, 0x47547d8b8f08:1
0x47547d8bae38: i32 = Register $r0
0x47547d8b8f08: ch,glue = callseq_end 0x47547d8b6138, TargetConstant:i32<0>, TargetConstant:i32<-1>, 0x47547d8b6138:1
0x47547d8ba618: f32 = fsub nnan ninf nsz contract afn reassoc 0x47547d8b6750, 0x47547d8bcea0
0x47547d8b6750: f32 = fdiv nnan ninf nsz contract afn reassoc 0x47547d8ba888, 0x47547d8ba208
0x47547d8ba888: f32 = fsub nnan ninf nsz contract afn reassoc 0x47547d8baa28, 0x47547d8ba138
0x47547d8baa28: f32,ch = load<(load (s32) from %ir.scevgep907908, !tbaa !48)> 0x47547fd271e8, 0x47547d8ba2d8, undef:i32
0x47547d8ba2d8: i32 = add 0x47547d4d8888, 0x47547d8baa90
0x47547d4d8888: i32,ch = CopyFromReg 0x47547fd271e8, Register:i32 %278
0x47547da92bc8: i32 = Register %278
0x47547d8baa90: i32,ch = CopyFromReg 0x47547fd271e8, Register:i32 %199
0x47547d8ba340: i32 = Register %199
0x47547d7e0f08: i32 = undef
0x47547d8ba138: f32 = fadd nnan ninf nsz contract afn reassoc 0x47547d8ba8f0, 0x47547d8b6888
0x47547d8ba8f0: f32,ch = load<(load (s32) from %ir.scevgep904905, !tbaa !48)> 0x47547fd271e8, 0x47547d8ba1a0, undef:i32
0x47547d8ba1a0: i32 = add 0x47547d4d8888, 0x47547d8b6f08
0x47547d4d8888: i32,ch = CopyFromReg 0x47547fd271e8, Register:i32 %278
0x47547d8b6f08: i32,ch = CopyFromReg 0x47547fd271e8, Register:i32 %198
0x47547d7e0f08: i32 = undef
0x47547d8b6888: f32,ch = CopyFromReg 0x47547fd271e8, Register:f32 %1015
0x47547d8b4068: f32 = Register %1015
0x47547d8ba208: f32,ch = CopyFromReg 0x47547fd271e8, Register:f32 %1016
0x47547d8ba9c0: f32 = Register %1016
0x47547d8bcea0: f32 = sint_to_fp 0x47547d8b66e8
0x47547d8b66e8: i32 = fp_to_sint 0x47547d6d02d8
0x47547d6d02d8: f32 = bitcast 0x47547d8b8f70
0x47547d8b8f70: i32,ch,glue = CopyFromReg 0x47547d8b8f08, Register:i32 $r0, 0x47547d8b8f08:1
0x47547d8bae38: i32 = Register $r0
0x47547d8b8f08: ch,glue = callseq_end 0x47547d8b6138, TargetConstant:i32<0>, TargetConstant:i32<-1>, 0x47547d8b6138:1
0x47547d8bc820: i32 = TargetConstant<0>
0x47547d8b8ea0: i32 = TargetConstant<-1>
0x47547d8b6138: ch,glue = ARMISD::CALL 0x47547d8bcd00, TargetExternalSymbol:i32'floorf', Register:i32 $r0, RegisterMask:Untyped, 0x47547d8bcd00:1
0x47547d8b6000: v2f32 = fmul nnan ninf nsz contract afn reassoc 0x47547d4e3b60, 0x47547d7e02d8
0x47547d4e3b60: v2f32 = ARMISD::VDUP 0x47547d8bcaf8
0x47547d8bcaf8: f32 = fsub nnan ninf nsz contract afn reassoc ConstantFP:f32<1.000000e+00>, 0x47547d8b6478
0x47547d8bac98: f32 = ConstantFP<1.000000e+00>
0x47547d8b6478: f32 = fsub nnan ninf nsz contract afn reassoc 0x47547d8ba958, 0x47547d8b64e0
0x47547d8ba958: f32 = fdiv nnan ninf nsz contract afn reassoc 0x47547d8ba270, 0x47547d8ba208
0x47547d8ba270: f32 = fsub nnan ninf nsz contract afn reassoc 0x47547d8baa28, 0x47547d8b4000
0x47547d8baa28: f32,ch = load<(load (s32) from %ir.scevgep907908, !tbaa !48)> 0x47547fd271e8, 0x47547d8ba2d8, undef:i32
0x47547d8ba2d8: i32 = add 0x47547d4d8888, 0x47547d8baa90
0x47547d4d8888: i32,ch = CopyFromReg 0x47547fd271e8, Register:i32 %278
0x47547d8baa90: i32,ch = CopyFromReg 0x47547fd271e8, Register:i32 %199
0x47547d7e0f08: i32 = undef
0x47547d8b4000: f32 = fadd nnan ninf nsz contract afn reassoc 0x47547d8b68f0, 0x47547d8b6888
0x47547d8b68f0: f32,ch = load<(load (s32) from %ir.lsr.iv902906, !tbaa !48)> 0x47547fd271e8, 0x47547d4d8888, undef:i32
0x47547d4d8888: i32,ch = CopyFromReg 0x47547fd271e8, Register:i32 %278
0x47547d7e0f08: i32 = undef
0x47547d8b6888: f32,ch = CopyFromReg 0x47547fd271e8, Register:f32 %1015
0x47547d8b4068: f32 = Register %1015
0x47547d8ba208: f32,ch = CopyFromReg 0x47547fd271e8, Register:f32 %1016
0x47547d8ba9c0: f32 = Register %1016
0x47547d8b64e0: f32 = sint_to_fp 0x47547d8b6f70
0x47547d8b6f70: i32 = fp_to_sint 0x47547d4e53a8
0x47547d4e53a8: f32 = bitcast 0x47547d4d86e8
0x47547d4d86e8: i32,ch,glue = CopyFromReg 0x47547d7d6bc8, Register:i32 $r0, 0x47547d7d6bc8:1
0x47547d8bae38: i32 = Register $r0
0x47547d7d6bc8: ch,glue = callseq_end 0x47547d4e5750, TargetConstant:i32<0>, TargetConstant:i32<-1>, 0x47547d4e5750:1
0x47547d7e02d8: v2f32 = ARMISD::BUILD_VECTOR 0x47547d8bad68, 0x47547d8ba618
0x47547d8bad68: f32 = fsub nnan ninf nsz contract afn reassoc ConstantFP:f32<1.000000e+00>, 0x47547d8ba618
0x47547d8bac98: f32 = ConstantFP<1.000000e+00>
0x47547d8ba618: f32 = fsub nnan ninf nsz contract afn reassoc 0x47547d8b6750, 0x47547d8bcea0
0x47547d8b6750: f32 = fdiv nnan ninf nsz contract afn reassoc 0x47547d8ba888, 0x47547d8ba208
0x47547d8ba888: f32 = fsub nnan ninf nsz contract afn reassoc 0x47547d8baa28, 0x47547d8ba138
0x47547d8baa28: f32,ch = load<(load (s32) from %ir.scevgep907908, !tbaa !48)> 0x47547fd271e8, 0x47547d8ba2d8, undef:i32
0x47547d8ba2d8: i32 = add 0x47547d4d8888, 0x47547d8baa90
0x47547d4d8888: i32,ch = CopyFromReg 0x47547fd271e8, Register:i32 %278
0x47547d8baa90: i32,ch = CopyFromReg 0x47547fd271e8, Register:i32 %199
0x47547d7e0f08: i32 = undef
0x47547d8ba138: f32 = fadd nnan ninf nsz contract afn reassoc 0x47547d8ba8f0, 0x47547d8b6888
0x47547d8ba8f0: f32,ch = load<(load (s32) from %ir.scevgep904905, !tbaa !48)> 0x47547fd271e8, 0x47547d8ba1a0, undef:i32
0x47547d8ba1a0: i32 = add 0x47547d4d8888, 0x47547d8b6f08
0x47547d7e0f08: i32 = undef
0x47547d8b6888: f32,ch = CopyFromReg 0x47547fd271e8, Register:f32 %1015
0x47547d8b4068: f32 = Register %1015
0x47547d8ba208: f32,ch = CopyFromReg 0x47547fd271e8, Register:f32 %1016
0x47547d8ba9c0: f32 = Register %1016
0x47547d8bcea0: f32 = sint_to_fp 0x47547d8b66e8
0x47547d8b66e8: i32 = fp_to_sint 0x47547d6d02d8
0x47547d6d02d8: f32 = bitcast 0x47547d8b8f70
0x47547d8b8f70: i32,ch,glue = CopyFromReg 0x47547d8b8f08, Register:i32 $r0, 0x47547d8b8f08:1
0x47547d8bae38: i32 = Register $r0
0x47547d8b8f08: ch,glue = callseq_end 0x47547d8b6138, TargetConstant:i32<0>, TargetConstant:i32<-1>, 0x47547d8b6138:1
0x47547d8ba618: f32 = fsub nnan ninf nsz contract afn reassoc 0x47547d8b6750, 0x47547d8bcea0
0x47547d8b6750: f32 = fdiv nnan ninf nsz contract afn reassoc 0x47547d8ba888, 0x47547d8ba208
0x47547d8ba888: f32 = fsub nnan ninf nsz contract afn reassoc 0x47547d8baa28, 0x47547d8ba138
0x47547d8baa28: f32,ch = load<(load (s32) from %ir.scevgep907908, !tbaa !48)> 0x47547fd271e8, 0x47547d8ba2d8, undef:i32
0x47547d8ba2d8: i32 = add 0x47547d4d8888, 0x47547d8baa90
0x47547d4d8888: i32,ch = CopyFromReg 0x47547fd271e8, Register:i32 %278
0x47547da92bc8: i32 = Register %278
0x47547d8baa90: i32,ch = CopyFromReg 0x47547fd271e8, Register:i32 %199
0x47547d8ba340: i32 = Register %199
0x47547d7e0f08: i32 = undef
0x47547d8ba138: f32 = fadd nnan ninf nsz contract afn reassoc 0x47547d8ba8f0, 0x47547d8b6888
0x47547d8ba8f0: f32,ch = load<(load (s32) from %ir.scevgep904905, !tbaa !48)> 0x47547fd271e8, 0x47547d8ba1a0, undef:i32
0x47547d8ba1a0: i32 = add 0x47547d4d8888, 0x47547d8b6f08
0x47547d4d8888: i32,ch = CopyFromReg 0x47547fd271e8, Register:i32 %278
0x47547d8b6f08: i32,ch = CopyFromReg 0x47547fd271e8, Register:i32 %198
0x47547d7e0f08: i32 = undef
0x47547d8b6888: f32,ch = CopyFromReg 0x47547fd271e8, Register:f32 %1015
0x47547d8b4068: f32 = Register %1015
0x47547d8ba208: f32,ch = CopyFromReg 0x47547fd271e8, Register:f32 %1016
0x47547d8ba9c0: f32 = Register %1016
0x47547d8bcea0: f32 = sint_to_fp 0x47547d8b66e8
0x47547d8b66e8: i32 = fp_to_sint 0x47547d6d02d8
0x47547d6d02d8: f32 = bitcast 0x47547d8b8f70
0x47547d8b8f70: i32,ch,glue = CopyFromReg 0x47547d8b8f08, Register:i32 $r0, 0x47547d8b8f08:1
0x47547d8bae38: i32 = Register $r0
0x47547d8b8f08: ch,glue = callseq_end 0x47547d8b6138, TargetConstant:i32<0>, TargetConstant:i32<-1>, 0x47547d8b6138:1
0x47547d8bc820: i32 = TargetConstant<0>
0x47547d8b8ea0: i32 = TargetConstant<-1>
0x47547d8b6138: ch,glue = ARMISD::CALL 0x47547d8bcd00, TargetExternalSymbol:i32'floorf', Register:i32 $r0, RegisterMask:Untyped, 0x47547d8bcd00:1
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107068/new/
https://reviews.llvm.org/D107068
More information about the llvm-commits
mailing list