Skip to content

Instantly share code, notes, and snippets.

@denzp
Created June 21, 2017 18:42
Show Gist options
  • Save denzp/ff95431368347b06b169a836bad27f7b to your computer and use it in GitHub Desktop.
Save denzp/ff95431368347b06b169a836bad27f7b to your computer and use it in GitHub Desktop.
=== internal
Initial selection DAG: BB#0 'internal:start'
SelectionDAG has 34 nodes:
t0: ch = EntryToken
t4: i64,ch = load<LD8[null(addrspace=101)]> t0, TargetExternalSymbol:i64'internal_param_0', undef:i64
t6: i64 = add TargetExternalSymbol:i64'internal_param_0', Constant:i64<8>
t7: i64,ch = load<LD8[null(addrspace=101)]> t0, t6, undef:i64
t9: i64,ch = load<LD8[null(addrspace=101)]> t0, TargetExternalSymbol:i64'internal_param_1', undef:i64
t10: i64 = add TargetExternalSymbol:i64'internal_param_1', Constant:i64<8>
t11: i64,ch = load<LD8[null(addrspace=101)]> t0, t10, undef:i64
t12: i128 = build_pair t4, t7
t19: i128 = build_pair t9, t11
t25: i128 = sdiv t12, t19
t15: ch = CopyToReg t0, Register:i64 %vreg0, t4
t17: ch = CopyToReg t0, Register:i64 %vreg1, t7
t18: ch = TokenFactor t15, t17
t21: ch = CopyToReg t0, Register:i64 %vreg2, t9
t23: ch = CopyToReg t0, Register:i64 %vreg3, t11
t24: ch = TokenFactor t21, t23
t26: ch = TokenFactor t18, t24
t28: i64 = extract_element t25, Constant:i64<0>
t30: ch = NVPTXISD::StoreRetval<LDST8[<unknown>]> t26, Constant:i32<0>, t28
t27: i64 = extract_element t25, Constant:i64<1>
t32: ch = NVPTXISD::StoreRetval<LDST8[<unknown>]> t30, Constant:i32<8>, t27
t33: ch = NVPTXISD::RET_FLAG t32
Optimized lowered selection DAG: BB#0 'internal:start'
SelectionDAG has 32 nodes:
t0: ch = EntryToken
t4: i64,ch = load<LD8[null(addrspace=101)]> t0, TargetExternalSymbol:i64'internal_param_0', undef:i64
t6: i64 = add TargetExternalSymbol:i64'internal_param_0', Constant:i64<8>
t7: i64,ch = load<LD8[null(addrspace=101)]> t0, t6, undef:i64
t9: i64,ch = load<LD8[null(addrspace=101)]> t0, TargetExternalSymbol:i64'internal_param_1', undef:i64
t10: i64 = add TargetExternalSymbol:i64'internal_param_1', Constant:i64<8>
t11: i64,ch = load<LD8[null(addrspace=101)]> t0, t10, undef:i64
t12: i128 = build_pair t4, t7
t19: i128 = build_pair t9, t11
t25: i128 = sdiv t12, t19
t15: ch = CopyToReg t0, Register:i64 %vreg0, t4
t17: ch = CopyToReg t0, Register:i64 %vreg1, t7
t21: ch = CopyToReg t0, Register:i64 %vreg2, t9
t23: ch = CopyToReg t0, Register:i64 %vreg3, t11
t34: ch = TokenFactor t15, t17, t21, t23
t28: i64 = extract_element t25, Constant:i64<0>
t30: ch = NVPTXISD::StoreRetval<LDST8[<unknown>]> t34, Constant:i32<0>, t28
t27: i64 = extract_element t25, Constant:i64<1>
t32: ch = NVPTXISD::StoreRetval<LDST8[<unknown>]> t30, Constant:i32<8>, t27
t33: ch = NVPTXISD::RET_FLAG t32
Type-legalized selection DAG: BB#0 'internal:start'
SelectionDAG has 48 nodes:
t0: ch = EntryToken
t4: i64,ch = load<LD8[null(addrspace=101)]> t0, TargetExternalSymbol:i64'internal_param_0', undef:i64
t6: i64 = add TargetExternalSymbol:i64'internal_param_0', Constant:i64<8>
t7: i64,ch = load<LD8[null(addrspace=101)]> t0, t6, undef:i64
t9: i64,ch = load<LD8[null(addrspace=101)]> t0, TargetExternalSymbol:i64'internal_param_1', undef:i64
t10: i64 = add TargetExternalSymbol:i64'internal_param_1', Constant:i64<8>
t11: i64,ch = load<LD8[null(addrspace=101)]> t0, t10, undef:i64
t37: ch,glue = callseq_start t0, TargetConstant:i64<0>
t39: ch,glue = NVPTXISD::DeclareParam t37, Constant:i32<8>, Constant:i32<0>, Constant:i32<16>, t37:1
t40: ch,glue = NVPTXISD::StoreParam<LDST8[<unknown>]> t39, Constant:i32<0>, Constant:i32<0>, t4, t39:1
t41: ch,glue = NVPTXISD::StoreParam<LDST8[<unknown>]> t40, Constant:i32<0>, Constant:i32<8>, t7, t40:1
t43: ch,glue = NVPTXISD::DeclareParam t41, Constant:i32<8>, Constant:i32<1>, Constant:i32<16>, t41:1
t44: ch,glue = NVPTXISD::StoreParam<LDST8[<unknown>]> t43, Constant:i32<1>, Constant:i32<0>, t9, t43:1
t45: ch,glue = NVPTXISD::StoreParam<LDST8[<unknown>]> t44, Constant:i32<1>, Constant:i32<8>, t11, t44:1
t46: ch,glue = NVPTXISD::DeclareRetParam t45, Constant:i32<8>, Constant:i32<16>, Constant:i32<0>, t45:1
t48: ch,glue = NVPTXISD::CallPrototype t46, TargetExternalSymbol:i32'prototype_0 : .callprototype (.param .b128 _) _ (.param .b128 _, .param .b128 _);', t46:1
t49: ch,glue = NVPTXISD::PrintCall t48, Constant:i32<1>, t48:1
t50: ch,glue = NVPTXISD::CallVoid t49, ExternalSymbol:i64'__divti3', t49:1
t51: ch,glue = NVPTXISD::CallArgBegin t50, t50:1
t52: ch,glue = NVPTXISD::CallArg t51, Constant:i32<1>, Constant:i32<0>, t51:1
t53: ch,glue = NVPTXISD::LastCallArg t52, Constant:i32<1>, Constant:i32<1>, t52:1
t54: ch,glue = NVPTXISD::CallArgEnd t53, Constant:i32<0>, t53:1
t55: ch,glue = NVPTXISD::Prototype t54, Constant:i32<0>, t54:1
t56: i64,ch,glue = NVPTXISD::LoadParam<LDST8[<unknown>]> t55, Constant:i32<1>, Constant:i32<0>, t55:1
t15: ch = CopyToReg t0, Register:i64 %vreg0, t4
t17: ch = CopyToReg t0, Register:i64 %vreg1, t7
t21: ch = CopyToReg t0, Register:i64 %vreg2, t9
t23: ch = CopyToReg t0, Register:i64 %vreg3, t11
t34: ch = TokenFactor t15, t17, t21, t23
t30: ch = NVPTXISD::StoreRetval<LDST8[<unknown>]> t34, Constant:i32<0>, t56
t57: i64,ch,glue = NVPTXISD::LoadParam<LDST8[<unknown>]> t56:1, Constant:i32<1>, Constant:i32<8>, t56:2
t32: ch = NVPTXISD::StoreRetval<LDST8[<unknown>]> t30, Constant:i32<8>, t57
t33: ch = NVPTXISD::RET_FLAG t32
Optimized type-legalized selection DAG: BB#0 'internal:start'
SelectionDAG has 48 nodes:
t0: ch = EntryToken
t4: i64,ch = load<LD8[null(addrspace=101)]> t0, TargetExternalSymbol:i64'internal_param_0', undef:i64
t6: i64 = add TargetExternalSymbol:i64'internal_param_0', Constant:i64<8>
t7: i64,ch = load<LD8[null(addrspace=101)]> t0, t6, undef:i64
t9: i64,ch = load<LD8[null(addrspace=101)]> t0, TargetExternalSymbol:i64'internal_param_1', undef:i64
t10: i64 = add TargetExternalSymbol:i64'internal_param_1', Constant:i64<8>
t11: i64,ch = load<LD8[null(addrspace=101)]> t0, t10, undef:i64
t37: ch,glue = callseq_start t0, TargetConstant:i64<0>
t39: ch,glue = NVPTXISD::DeclareParam t37, Constant:i32<8>, Constant:i32<0>, Constant:i32<16>, t37:1
t40: ch,glue = NVPTXISD::StoreParam<LDST8[<unknown>]> t39, Constant:i32<0>, Constant:i32<0>, t4, t39:1
t41: ch,glue = NVPTXISD::StoreParam<LDST8[<unknown>]> t40, Constant:i32<0>, Constant:i32<8>, t7, t40:1
t43: ch,glue = NVPTXISD::DeclareParam t41, Constant:i32<8>, Constant:i32<1>, Constant:i32<16>, t41:1
t44: ch,glue = NVPTXISD::StoreParam<LDST8[<unknown>]> t43, Constant:i32<1>, Constant:i32<0>, t9, t43:1
t45: ch,glue = NVPTXISD::StoreParam<LDST8[<unknown>]> t44, Constant:i32<1>, Constant:i32<8>, t11, t44:1
t46: ch,glue = NVPTXISD::DeclareRetParam t45, Constant:i32<8>, Constant:i32<16>, Constant:i32<0>, t45:1
t48: ch,glue = NVPTXISD::CallPrototype t46, TargetExternalSymbol:i32'prototype_0 : .callprototype (.param .b128 _) _ (.param .b128 _, .param .b128 _);', t46:1
t49: ch,glue = NVPTXISD::PrintCall t48, Constant:i32<1>, t48:1
t50: ch,glue = NVPTXISD::CallVoid t49, ExternalSymbol:i64'__divti3', t49:1
t51: ch,glue = NVPTXISD::CallArgBegin t50, t50:1
t52: ch,glue = NVPTXISD::CallArg t51, Constant:i32<1>, Constant:i32<0>, t51:1
t53: ch,glue = NVPTXISD::LastCallArg t52, Constant:i32<1>, Constant:i32<1>, t52:1
t54: ch,glue = NVPTXISD::CallArgEnd t53, Constant:i32<0>, t53:1
t55: ch,glue = NVPTXISD::Prototype t54, Constant:i32<0>, t54:1
t56: i64,ch,glue = NVPTXISD::LoadParam<LDST8[<unknown>]> t55, Constant:i32<1>, Constant:i32<0>, t55:1
t15: ch = CopyToReg t0, Register:i64 %vreg0, t4
t17: ch = CopyToReg t0, Register:i64 %vreg1, t7
t21: ch = CopyToReg t0, Register:i64 %vreg2, t9
t23: ch = CopyToReg t0, Register:i64 %vreg3, t11
t34: ch = TokenFactor t15, t17, t21, t23
t30: ch = NVPTXISD::StoreRetval<LDST8[<unknown>]> t34, Constant:i32<0>, t56
t57: i64,ch,glue = NVPTXISD::LoadParam<LDST8[<unknown>]> t56:1, Constant:i32<1>, Constant:i32<8>, t56:2
t32: ch = NVPTXISD::StoreRetval<LDST8[<unknown>]> t30, Constant:i32<8>, t57
t33: ch = NVPTXISD::RET_FLAG t32
Legalized selection DAG: BB#0 'internal:start'
SelectionDAG has 48 nodes:
t0: ch = EntryToken
t4: i64,ch = load<LD8[null(addrspace=101)]> t0, TargetExternalSymbol:i64'internal_param_0', undef:i64
t9: i64,ch = load<LD8[null(addrspace=101)]> t0, TargetExternalSymbol:i64'internal_param_1', undef:i64
t37: ch,glue = callseq_start t0, TargetConstant:i64<0>
t6: i64 = add TargetExternalSymbol:i64'internal_param_0', Constant:i64<8>
t7: i64,ch = load<LD8[null(addrspace=101)]> t0, t6, undef:i64
t10: i64 = add TargetExternalSymbol:i64'internal_param_1', Constant:i64<8>
t11: i64,ch = load<LD8[null(addrspace=101)]> t0, t10, undef:i64
t39: ch,glue = NVPTXISD::DeclareParam t37, Constant:i32<8>, Constant:i32<0>, Constant:i32<16>, t37:1
t40: ch,glue = NVPTXISD::StoreParam<LDST8[<unknown>]> t39, Constant:i32<0>, Constant:i32<0>, t4, t39:1
t41: ch,glue = NVPTXISD::StoreParam<LDST8[<unknown>]> t40, Constant:i32<0>, Constant:i32<8>, t7, t40:1
t43: ch,glue = NVPTXISD::DeclareParam t41, Constant:i32<8>, Constant:i32<1>, Constant:i32<16>, t41:1
t44: ch,glue = NVPTXISD::StoreParam<LDST8[<unknown>]> t43, Constant:i32<1>, Constant:i32<0>, t9, t43:1
t45: ch,glue = NVPTXISD::StoreParam<LDST8[<unknown>]> t44, Constant:i32<1>, Constant:i32<8>, t11, t44:1
t46: ch,glue = NVPTXISD::DeclareRetParam t45, Constant:i32<8>, Constant:i32<16>, Constant:i32<0>, t45:1
t48: ch,glue = NVPTXISD::CallPrototype t46, TargetExternalSymbol:i32'prototype_0 : .callprototype (.param .b128 _) _ (.param .b128 _, .param .b128 _);', t46:1
t49: ch,glue = NVPTXISD::PrintCall t48, Constant:i32<1>, t48:1
t50: ch,glue = NVPTXISD::CallVoid t49, ExternalSymbol:i64'__divti3', t49:1
t51: ch,glue = NVPTXISD::CallArgBegin t50, t50:1
t52: ch,glue = NVPTXISD::CallArg t51, Constant:i32<1>, Constant:i32<0>, t51:1
t53: ch,glue = NVPTXISD::LastCallArg t52, Constant:i32<1>, Constant:i32<1>, t52:1
t54: ch,glue = NVPTXISD::CallArgEnd t53, Constant:i32<0>, t53:1
t55: ch,glue = NVPTXISD::Prototype t54, Constant:i32<0>, t54:1
t56: i64,ch,glue = NVPTXISD::LoadParam<LDST8[<unknown>]> t55, Constant:i32<1>, Constant:i32<0>, t55:1
t15: ch = CopyToReg t0, Register:i64 %vreg0, t4
t17: ch = CopyToReg t0, Register:i64 %vreg1, t7
t21: ch = CopyToReg t0, Register:i64 %vreg2, t9
t23: ch = CopyToReg t0, Register:i64 %vreg3, t11
t34: ch = TokenFactor t15, t17, t21, t23
t30: ch = NVPTXISD::StoreRetval<LDST8[<unknown>]> t34, Constant:i32<0>, t56
t57: i64,ch,glue = NVPTXISD::LoadParam<LDST8[<unknown>]> t56:1, Constant:i32<1>, Constant:i32<8>, t56:2
t32: ch = NVPTXISD::StoreRetval<LDST8[<unknown>]> t30, Constant:i32<8>, t57
t33: ch = NVPTXISD::RET_FLAG t32
Optimized legalized selection DAG: BB#0 'internal:start'
SelectionDAG has 48 nodes:
t0: ch = EntryToken
t4: i64,ch = load<LD8[null(addrspace=101)]> t0, TargetExternalSymbol:i64'internal_param_0', undef:i64
t9: i64,ch = load<LD8[null(addrspace=101)]> t0, TargetExternalSymbol:i64'internal_param_1', undef:i64
t37: ch,glue = callseq_start t0, TargetConstant:i64<0>
t6: i64 = add TargetExternalSymbol:i64'internal_param_0', Constant:i64<8>
t7: i64,ch = load<LD8[null(addrspace=101)]> t0, t6, undef:i64
t10: i64 = add TargetExternalSymbol:i64'internal_param_1', Constant:i64<8>
t11: i64,ch = load<LD8[null(addrspace=101)]> t0, t10, undef:i64
t39: ch,glue = NVPTXISD::DeclareParam t37, Constant:i32<8>, Constant:i32<0>, Constant:i32<16>, t37:1
t40: ch,glue = NVPTXISD::StoreParam<LDST8[<unknown>]> t39, Constant:i32<0>, Constant:i32<0>, t4, t39:1
t41: ch,glue = NVPTXISD::StoreParam<LDST8[<unknown>]> t40, Constant:i32<0>, Constant:i32<8>, t7, t40:1
t43: ch,glue = NVPTXISD::DeclareParam t41, Constant:i32<8>, Constant:i32<1>, Constant:i32<16>, t41:1
t44: ch,glue = NVPTXISD::StoreParam<LDST8[<unknown>]> t43, Constant:i32<1>, Constant:i32<0>, t9, t43:1
t45: ch,glue = NVPTXISD::StoreParam<LDST8[<unknown>]> t44, Constant:i32<1>, Constant:i32<8>, t11, t44:1
t46: ch,glue = NVPTXISD::DeclareRetParam t45, Constant:i32<8>, Constant:i32<16>, Constant:i32<0>, t45:1
t48: ch,glue = NVPTXISD::CallPrototype t46, TargetExternalSymbol:i32'prototype_0 : .callprototype (.param .b128 _) _ (.param .b128 _, .param .b128 _);', t46:1
t49: ch,glue = NVPTXISD::PrintCall t48, Constant:i32<1>, t48:1
t50: ch,glue = NVPTXISD::CallVoid t49, ExternalSymbol:i64'__divti3', t49:1
t51: ch,glue = NVPTXISD::CallArgBegin t50, t50:1
t52: ch,glue = NVPTXISD::CallArg t51, Constant:i32<1>, Constant:i32<0>, t51:1
t53: ch,glue = NVPTXISD::LastCallArg t52, Constant:i32<1>, Constant:i32<1>, t52:1
t54: ch,glue = NVPTXISD::CallArgEnd t53, Constant:i32<0>, t53:1
t55: ch,glue = NVPTXISD::Prototype t54, Constant:i32<0>, t54:1
t56: i64,ch,glue = NVPTXISD::LoadParam<LDST8[<unknown>]> t55, Constant:i32<1>, Constant:i32<0>, t55:1
t15: ch = CopyToReg t0, Register:i64 %vreg0, t4
t17: ch = CopyToReg t0, Register:i64 %vreg1, t7
t21: ch = CopyToReg t0, Register:i64 %vreg2, t9
t23: ch = CopyToReg t0, Register:i64 %vreg3, t11
t34: ch = TokenFactor t15, t17, t21, t23
t30: ch = NVPTXISD::StoreRetval<LDST8[<unknown>]> t34, Constant:i32<0>, t56
t57: i64,ch,glue = NVPTXISD::LoadParam<LDST8[<unknown>]> t56:1, Constant:i32<1>, Constant:i32<8>, t56:2
t32: ch = NVPTXISD::StoreRetval<LDST8[<unknown>]> t30, Constant:i32<8>, t57
t33: ch = NVPTXISD::RET_FLAG t32
===== Instruction selection begins: BB#0 'start'
ISEL: Starting pattern match on root node: t33: ch = NVPTXISD::RET_FLAG t32
Morphed node: t33: ch = Return t32
ISEL: Match complete!
ISEL: Starting pattern match on root node: t55: ch,glue = NVPTXISD::Prototype t54, Constant:i32<0>, t54:1
Initial Opcode index to 41691
Morphed node: t55: ch,glue = PrototypeInst TargetConstant:i32<0>, t54, t54:1
ISEL: Match complete!
ISEL: Starting pattern match on root node: t54: ch,glue = NVPTXISD::CallArgEnd t53, Constant:i32<0>, t53:1
Initial Opcode index to 20995
Skipped scope entry (due to false predicate) at index 20999, continuing at 21009
Morphed node: t54: ch,glue = CallArgEndInst0 t53, t53:1
ISEL: Match complete!
ISEL: Starting pattern match on root node: t53: ch,glue = NVPTXISD::LastCallArg t52, Constant:i32<1>, Constant:i32<1>, t52:1
Initial Opcode index to 12125
Skipped scope entry (due to false predicate) at index 12129, continuing at 12203
Morphed node: t53: ch,glue = LastCallArgParam TargetConstant:i32<1>, t52, t52:1
ISEL: Match complete!
ISEL: Starting pattern match on root node: t52: ch,glue = NVPTXISD::CallArg t51, Constant:i32<1>, Constant:i32<0>, t51:1
Initial Opcode index to 12021
Skipped scope entry (due to false predicate) at index 12025, continuing at 12099
Morphed node: t52: ch,glue = CallArgParam TargetConstant:i32<0>, t51, t51:1
ISEL: Match complete!
ISEL: Starting pattern match on root node: t51: ch,glue = NVPTXISD::CallArgBegin t50, t50:1
Initial Opcode index to 42144
Morphed node: t51: ch,glue = CallArgBeginInst t50, t50:1
ISEL: Match complete!
ISEL: Starting pattern match on root node: t50: ch,glue = NVPTXISD::CallVoid t49, ExternalSymbol:i64'__divti3', t49:1
Initial Opcode index to 20191
Match failed at index 20196
Continuing at 20213
Skipped scope entry (due to false predicate) at index 20217, continuing at 20226
Morphed node: t50: ch,glue = CallVoidInstReg64 ExternalSymbol:i64'__divti3', t49, t49:1
ISEL: Match complete!
ISEL: Starting pattern match on root node: t49: ch,glue = NVPTXISD::PrintCall t48, Constant:i32<1>, t48:1
Initial Opcode index to 20571
Skipped scope entry (due to false predicate) at index 20575, continuing at 20585
Morphed node: t49: ch,glue = CallPrintCallRetInst1 t48, t48:1
ISEL: Match complete!
ISEL: Starting pattern match on root node: t48: ch,glue = NVPTXISD::CallPrototype t46, TargetExternalSymbol:i32'prototype_0 : .callprototype (.param .b128 _) _ (.param .b128 _, .param .b128 _);', t46:1
Initial Opcode index to 41761
Morphed node: t48: ch,glue = CALL_PROTOTYPE TargetExternalSymbol:i32'prototype_0 : .callprototype (.param .b128 _) _ (.param .b128 _, .param .b128 _);', t46, t46:1
ISEL: Match complete!
ISEL: Starting pattern match on root node: t46: ch,glue = NVPTXISD::DeclareRetParam t45, Constant:i32<8>, Constant:i32<16>, Constant:i32<0>, t45:1
Initial Opcode index to 11933
Morphed node: t46: ch,glue = DeclareRetMemInst TargetConstant:i32<8>, TargetConstant:i32<16>, TargetConstant:i32<0>, t45, t45:1
ISEL: Match complete!
ISEL: Starting pattern match on root node: t43: ch,glue = NVPTXISD::DeclareParam t41, Constant:i32<8>, Constant:i32<1>, Constant:i32<16>, t41:1
Initial Opcode index to 11977
Morphed node: t43: ch,glue = DeclareParamInst TargetConstant:i32<8>, TargetConstant:i32<1>, TargetConstant:i32<16>, t41, t41:1
ISEL: Match complete!
ISEL: Starting pattern match on root node: t39: ch,glue = NVPTXISD::DeclareParam t37, Constant:i32<8>, Constant:i32<0>, Constant:i32<16>, t37:1
Initial Opcode index to 11977
Morphed node: t39: ch,glue = DeclareParamInst TargetConstant:i32<8>, TargetConstant:i32<0>, TargetConstant:i32<16>, t37, t37:1
ISEL: Match complete!
ISEL: Starting pattern match on root node: t37: ch,glue = callseq_start t0, TargetConstant:i64<0>
Initial Opcode index to 41744
Morphed node: t37: ch,glue = Callseq_Start TargetConstant:i64<0>, t0
ISEL: Match complete!
ISEL: Starting pattern match on root node: t35: i64 = ExternalSymbol'__divti3'
Initial Opcode index to 0
Match failed at index 0
LLVM ERROR: Cannot select: t35: i64 = ExternalSymbol'__divti3'
In function: internal
*** IR Dump Before Pre-ISel Intrinsic Lowering ***; ModuleID = 'test.ll'
source_filename = "test.ll"
target datalayout = "e-i64:64-v16:16-v32:32-n16:32:64"
target triple = "nvptx64-nvidia-cuda"
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
; Function Attrs: norecurse nounwind readnone
define ptx_kernel void @foo(i128, i128, i128*) unnamed_addr #0 {
start:
%a = call i128 @internal(i128 %0, i128 %1)
store i128 %a, i128* %2
ret void
}
attributes #0 = { norecurse nounwind readnone }
*** IR Dump After Pre-ISel Intrinsic Lowering ***; ModuleID = 'test.ll'
source_filename = "test.ll"
target datalayout = "e-i64:64-v16:16-v32:32-n16:32:64"
target triple = "nvptx64-nvidia-cuda"
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
; Function Attrs: norecurse nounwind readnone
define ptx_kernel void @foo(i128, i128, i128*) unnamed_addr #0 {
start:
%a = call i128 @internal(i128 %0, i128 %1)
store i128 %a, i128* %2
ret void
}
attributes #0 = { norecurse nounwind readnone }
*** IR Dump Before Replace occurrences of __nvvm_reflect() calls with 0/1 ***
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
*** IR Dump After Replace occurrences of __nvvm_reflect() calls with 0/1 ***
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
*** IR Dump Before Replace occurrences of __nvvm_reflect() calls with 0/1 ***
; Function Attrs: norecurse nounwind readnone
define ptx_kernel void @foo(i128, i128, i128*) unnamed_addr #0 {
start:
%a = call i128 @internal(i128 %0, i128 %1)
store i128 %a, i128* %2
ret void
}
*** IR Dump After Replace occurrences of __nvvm_reflect() calls with 0/1 ***
; Function Attrs: norecurse nounwind readnone
define ptx_kernel void @foo(i128, i128, i128*) unnamed_addr #0 {
start:
%a = call i128 @internal(i128 %0, i128 %1)
store i128 %a, i128* %2
ret void
}
*** IR Dump Before Assign valid PTX names to globals ***; ModuleID = 'test.ll'
source_filename = "test.ll"
target datalayout = "e-i64:64-v16:16-v32:32-n16:32:64"
target triple = "nvptx64-nvidia-cuda"
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
; Function Attrs: norecurse nounwind readnone
define ptx_kernel void @foo(i128, i128, i128*) unnamed_addr #0 {
start:
%a = call i128 @internal(i128 %0, i128 %1)
store i128 %a, i128* %2
ret void
}
attributes #0 = { norecurse nounwind readnone }
*** IR Dump After Assign valid PTX names to globals ***; ModuleID = 'test.ll'
source_filename = "test.ll"
target datalayout = "e-i64:64-v16:16-v32:32-n16:32:64"
target triple = "nvptx64-nvidia-cuda"
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
; Function Attrs: norecurse nounwind readnone
define ptx_kernel void @foo(i128, i128, i128*) unnamed_addr #0 {
start:
%a = call i128 @internal(i128 %0, i128 %1)
store i128 %a, i128* %2
ret void
}
attributes #0 = { norecurse nounwind readnone }
*** IR Dump Before Ensure that the global variables are in the global address space ***; ModuleID = 'test.ll'
source_filename = "test.ll"
target datalayout = "e-i64:64-v16:16-v32:32-n16:32:64"
target triple = "nvptx64-nvidia-cuda"
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
; Function Attrs: norecurse nounwind readnone
define ptx_kernel void @foo(i128, i128, i128*) unnamed_addr #0 {
start:
%a = call i128 @internal(i128 %0, i128 %1)
store i128 %a, i128* %2
ret void
}
attributes #0 = { norecurse nounwind readnone }
*** IR Dump After Ensure that the global variables are in the global address space ***; ModuleID = 'test.ll'
source_filename = "test.ll"
target datalayout = "e-i64:64-v16:16-v32:32-n16:32:64"
target triple = "nvptx64-nvidia-cuda"
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
; Function Attrs: norecurse nounwind readnone
define ptx_kernel void @foo(i128, i128, i128*) unnamed_addr #0 {
start:
%a = call i128 @internal(i128 %0, i128 %1)
store i128 %a, i128* %2
ret void
}
attributes #0 = { norecurse nounwind readnone }
*** IR Dump Before Lower pointer arguments of CUDA kernels ***
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
*** IR Dump After Lower pointer arguments of CUDA kernels ***
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
*** IR Dump Before Module Verifier ***
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
*** IR Dump After Module Verifier ***
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
*** IR Dump Before Lower Garbage Collection Instructions ***
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
*** IR Dump After Lower Garbage Collection Instructions ***
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
*** IR Dump Before Shadow Stack GC Lowering ***
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
*** IR Dump After Shadow Stack GC Lowering ***
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
*** IR Dump Before Remove unreachable blocks from the CFG ***
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
*** IR Dump After Remove unreachable blocks from the CFG ***
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
*** IR Dump Before Inserts calls to mcount-like functions ***
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
*** IR Dump After Inserts calls to mcount-like functions ***
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
*** IR Dump Before Lower pointer arguments of CUDA kernels ***
; Function Attrs: norecurse nounwind readnone
define ptx_kernel void @foo(i128, i128, i128*) unnamed_addr #0 {
start:
%a = call i128 @internal(i128 %0, i128 %1)
store i128 %a, i128* %2
ret void
}
*** IR Dump After Lower pointer arguments of CUDA kernels ***
; Function Attrs: norecurse nounwind readnone
define ptx_kernel void @foo(i128, i128, i128*) unnamed_addr #0 {
start:
%3 = addrspacecast i128* %2 to i128 addrspace(1)*
%4 = addrspacecast i128 addrspace(1)* %3 to i128*
%a = call i128 @internal(i128 %0, i128 %1)
store i128 %a, i128* %4
ret void
}
*** IR Dump Before Module Verifier ***
; Function Attrs: norecurse nounwind readnone
define ptx_kernel void @foo(i128, i128, i128*) unnamed_addr #0 {
start:
%3 = addrspacecast i128* %2 to i128 addrspace(1)*
%4 = addrspacecast i128 addrspace(1)* %3 to i128*
%a = call i128 @internal(i128 %0, i128 %1)
store i128 %a, i128* %4
ret void
}
*** IR Dump After Module Verifier ***
; Function Attrs: norecurse nounwind readnone
define ptx_kernel void @foo(i128, i128, i128*) unnamed_addr #0 {
start:
%3 = addrspacecast i128* %2 to i128 addrspace(1)*
%4 = addrspacecast i128 addrspace(1)* %3 to i128*
%a = call i128 @internal(i128 %0, i128 %1)
store i128 %a, i128* %4
ret void
}
*** IR Dump Before Lower Garbage Collection Instructions ***
; Function Attrs: norecurse nounwind readnone
define ptx_kernel void @foo(i128, i128, i128*) unnamed_addr #0 {
start:
%3 = addrspacecast i128* %2 to i128 addrspace(1)*
%4 = addrspacecast i128 addrspace(1)* %3 to i128*
%a = call i128 @internal(i128 %0, i128 %1)
store i128 %a, i128* %4
ret void
}
*** IR Dump After Lower Garbage Collection Instructions ***
; Function Attrs: norecurse nounwind readnone
define ptx_kernel void @foo(i128, i128, i128*) unnamed_addr #0 {
start:
%3 = addrspacecast i128* %2 to i128 addrspace(1)*
%4 = addrspacecast i128 addrspace(1)* %3 to i128*
%a = call i128 @internal(i128 %0, i128 %1)
store i128 %a, i128* %4
ret void
}
*** IR Dump Before Shadow Stack GC Lowering ***
; Function Attrs: norecurse nounwind readnone
define ptx_kernel void @foo(i128, i128, i128*) unnamed_addr #0 {
start:
%3 = addrspacecast i128* %2 to i128 addrspace(1)*
%4 = addrspacecast i128 addrspace(1)* %3 to i128*
%a = call i128 @internal(i128 %0, i128 %1)
store i128 %a, i128* %4
ret void
}
*** IR Dump After Shadow Stack GC Lowering ***
; Function Attrs: norecurse nounwind readnone
define ptx_kernel void @foo(i128, i128, i128*) unnamed_addr #0 {
start:
%3 = addrspacecast i128* %2 to i128 addrspace(1)*
%4 = addrspacecast i128 addrspace(1)* %3 to i128*
%a = call i128 @internal(i128 %0, i128 %1)
store i128 %a, i128* %4
ret void
}
*** IR Dump Before Remove unreachable blocks from the CFG ***
; Function Attrs: norecurse nounwind readnone
define ptx_kernel void @foo(i128, i128, i128*) unnamed_addr #0 {
start:
%3 = addrspacecast i128* %2 to i128 addrspace(1)*
%4 = addrspacecast i128 addrspace(1)* %3 to i128*
%a = call i128 @internal(i128 %0, i128 %1)
store i128 %a, i128* %4
ret void
}
*** IR Dump After Remove unreachable blocks from the CFG ***
; Function Attrs: norecurse nounwind readnone
define ptx_kernel void @foo(i128, i128, i128*) unnamed_addr #0 {
start:
%3 = addrspacecast i128* %2 to i128 addrspace(1)*
%4 = addrspacecast i128 addrspace(1)* %3 to i128*
%a = call i128 @internal(i128 %0, i128 %1)
store i128 %a, i128* %4
ret void
}
*** IR Dump Before Inserts calls to mcount-like functions ***
; Function Attrs: norecurse nounwind readnone
define ptx_kernel void @foo(i128, i128, i128*) unnamed_addr #0 {
start:
%3 = addrspacecast i128* %2 to i128 addrspace(1)*
%4 = addrspacecast i128 addrspace(1)* %3 to i128*
%a = call i128 @internal(i128 %0, i128 %1)
store i128 %a, i128* %4
ret void
}
*** IR Dump After Inserts calls to mcount-like functions ***
; Function Attrs: norecurse nounwind readnone
define ptx_kernel void @foo(i128, i128, i128*) unnamed_addr #0 {
start:
%3 = addrspacecast i128* %2 to i128 addrspace(1)*
%4 = addrspacecast i128 addrspace(1)* %3 to i128*
%a = call i128 @internal(i128 %0, i128 %1)
store i128 %a, i128* %4
ret void
}
*** IR Dump Before Rewrite Symbols ***; ModuleID = 'test.ll'
source_filename = "test.ll"
target datalayout = "e-i64:64-v16:16-v32:32-n16:32:64"
target triple = "nvptx64-nvidia-cuda"
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
; Function Attrs: norecurse nounwind readnone
define ptx_kernel void @foo(i128, i128, i128*) unnamed_addr #0 {
start:
%3 = addrspacecast i128* %2 to i128 addrspace(1)*
%4 = addrspacecast i128 addrspace(1)* %3 to i128*
%a = call i128 @internal(i128 %0, i128 %1)
store i128 %a, i128* %4
ret void
}
attributes #0 = { norecurse nounwind readnone }
*** IR Dump After Rewrite Symbols ***; ModuleID = 'test.ll'
source_filename = "test.ll"
target datalayout = "e-i64:64-v16:16-v32:32-n16:32:64"
target triple = "nvptx64-nvidia-cuda"
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
; Function Attrs: norecurse nounwind readnone
define ptx_kernel void @foo(i128, i128, i128*) unnamed_addr #0 {
start:
%3 = addrspacecast i128* %2 to i128 addrspace(1)*
%4 = addrspacecast i128 addrspace(1)* %3 to i128*
%a = call i128 @internal(i128 %0, i128 %1)
store i128 %a, i128* %4
ret void
}
attributes #0 = { norecurse nounwind readnone }
*** IR Dump Before Lower invoke and unwind, for unwindless code generators ***
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
*** IR Dump After Lower invoke and unwind, for unwindless code generators ***
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
*** IR Dump Before Remove unreachable blocks from the CFG ***
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
*** IR Dump After Remove unreachable blocks from the CFG ***
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
*** IR Dump Before Safe Stack instrumentation pass ***
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
*** IR Dump After Safe Stack instrumentation pass ***
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
*** IR Dump Before Module Verifier ***
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
*** IR Dump After Module Verifier ***
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
*** IR Dump Before Lower aggregate copies/intrinsics into loops ***
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
*** IR Dump After Lower aggregate copies/intrinsics into loops ***
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
*** IR Dump Before NVPTX specific alloca hoisting ***
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
*** IR Dump After NVPTX specific alloca hoisting ***
; Function Attrs: norecurse nounwind readnone
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
LLVM ERROR: Cannot select: t35: i64 = ExternalSymbol'__divti3'
In function: internal
target datalayout = "e-i64:64-v16:16-v32:32-n16:32:64"
target triple = "nvptx64-nvidia-cuda"
define i128 @internal(i128, i128) unnamed_addr #0 {
start:
%a = sdiv i128 %0, %1
ret i128 %a
}
define ptx_kernel void @foo(i128, i128, i128*) unnamed_addr #0 {
start:
%a = call i128 @internal(i128 %0, i128 %1)
store i128 %a, i128* %2
ret void
}
attributes #0 = { norecurse nounwind readnone }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment