Skip to content

Instantly share code, notes, and snippets.

@expenses
Last active November 12, 2021 23:40
Show Gist options
  • Save expenses/0aec3fd2dc03166b85d4ef2b1cf691d1 to your computer and use it in GitHub Desktop.
Save expenses/0aec3fd2dc03166b85d4ef2b1cf691d1 to your computer and use it in GitHub Desktop.
; SPIR-V
; Version: 1.3
; Generator: Embark Studios Rust GPU Compiler Backend; 0
; Bound: 167
; Schema: 0
OpCapability Float64
OpCapability Int16
OpCapability Int64
OpCapability Int8
OpCapability ShaderClockKHR
OpCapability Shader
OpCapability VulkanMemoryModel
OpExtension "SPV_KHR_shader_clock"
OpExtension "SPV_KHR_vulkan_memory_model"
OpMemoryModel Logical Vulkan
OpEntryPoint Fragment %1 "main"
OpExecutionMode %1 OriginUpperLeft
%2 = OpString "C:\\Users\\Ashley\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\num-traits-0.2.14\\src\\identities.rs"
%3 = OpString "C:\\Users\\Ashley\\.rustup\\toolchains\\nightly-2021-10-26-x86_64-pc-windows-msvc\\lib\\rustlib\\src\\rust\\library\\core\\src\\num\\int_macros.rs"
%4 = OpString "C:\\Users\\Ashley\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\num-traits-0.2.14\\src\\macros.rs"
%5 = OpString "C:\\Users\\Ashley\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\num-traits-0.2.14\\src\\float.rs"
%6 = OpString "C:\\Users\\Ashley\\.rustup\\toolchains\\nightly-2021-10-26-x86_64-pc-windows-msvc\\lib\\rustlib\\src\\rust\\library\\core\\src\\ops\\arith.rs"
%7 = OpString "C:\\Users\\Ashley\\.rustup\\toolchains\\nightly-2021-10-26-x86_64-pc-windows-msvc\\lib\\rustlib\\src\\rust\\library\\core\\src\\option.rs"
%8 = OpString "C:\\Users\\Ashley\\.rustup\\toolchains\\nightly-2021-10-26-x86_64-pc-windows-msvc\\lib\\rustlib\\src\\rust\\library\\core\\src\\panic.rs"
%9 = OpString "C:\\Users\\Ashley\\.rustup\\toolchains\\nightly-2021-10-26-x86_64-pc-windows-msvc\\lib\\rustlib\\src\\rust\\library\\core\\src\\mem\\mod.rs"
%10 = OpString "C:\\Users\\Ashley\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\num-traits-0.2.14\\src\\cast.rs"
%11 = OpString "C:\\Users\\Ashley\\Desktop\\rust-gpu\\tests\\ui\\arch\\powi.rs"
%12 = OpString "C:\\Users\\Ashley\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\num-traits-0.2.14\\src\\pow.rs"
%13 = OpString "C:\\Users\\Ashley\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\num-traits-0.2.14\\src\\lib.rs"
%14 = OpString "C:\\Users\\Ashley\\.rustup\\toolchains\\nightly-2021-10-26-x86_64-pc-windows-msvc\\lib\\rustlib\\src\\rust\\library\\core\\src\\ops\\arith.rs"
%15 = OpString "C:\\Users\\Ashley\\.rustup\\toolchains\\nightly-2021-10-26-x86_64-pc-windows-msvc\\lib\\rustlib\\src\\rust\\library\\core\\src\\clone.rs"
%16 = OpString "C:\\Users\\Ashley\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\num-traits-0.2.14\\src\\identities.rs"
OpName %core__option__Option_usize_ "core::option::Option<usize>"
OpName %powi__main "powi::main"
OpMemberDecorate %core__option__Option_usize_ 0 Offset 0
OpMemberDecorate %core__option__Option_usize_ 1 Offset 4
%float = OpTypeFloat 32
%float_1 = OpConstant %float 1
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%uint = OpTypeInt 32 0
%bool = OpTypeBool
%core__option__Option_usize_ = OpTypeStruct %uint %uint
%uint_0 = OpConstant %uint 0
%uint_1 = OpConstant %uint 1
%void = OpTypeVoid
%uint_4 = OpConstant %uint 4
%uint_4294967295 = OpConstant %uint 4294967295
%true = OpConstantTrue %bool
%31 = OpUndef %core__option__Option_usize_
%32 = OpTypeFunction %void
%float_5 = OpConstant %float 5
%int_5 = OpConstant %int 5
%float_3125 = OpConstant %float 3125
%false = OpConstantFalse %bool
%int_1 = OpConstant %int 1
%int_31 = OpConstant %int 31
%39 = OpUndef %float
%powi__main = OpFunction %void None %32
%40 = OpLabel
OpLine %5 677 11
%41 = OpSLessThan %bool %int_5 %int_0
OpLine %5 677 11
OpSelectionMerge %42 None
OpBranchConditional %41 %43 %44
%43 = OpLabel
OpLine %3 1163 12
%45 = OpISub %int %int_0 %int_5
OpLine %6 490 44
%46 = OpFDiv %float %float_1 %float_5
OpLine %5 677 8
OpBranch %42
%44 = OpLabel
OpBranch %42
%42 = OpLabel
%47 = OpPhi %int %45 %43 %int_5 %44
%48 = OpPhi %float %46 %43 %float_5 %44
OpLine %5 684 25
%49 = OpBitcast %uint %47
OpLine %10 231 15
%50 = OpULessThanEqual %bool %uint_4 %uint_4
OpLine %10 231 15
OpSelectionMerge %51 None
OpBranchConditional %50 %52 %53
%52 = OpLabel
OpLine %10 231 15
OpBranch %51
%53 = OpLabel
OpLine %10 231 59
%54 = OpULessThanEqual %bool %49 %uint_4294967295
OpLine %10 231 15
OpBranch %51
%51 = OpLabel
%55 = OpPhi %bool %true %52 %54 %53
OpLine %10 231 15
OpSelectionMerge %56 None
OpBranchConditional %55 %57 %58
%57 = OpLabel
OpLine %10 232 16
%59 = OpCompositeConstruct %core__option__Option_usize_ %uint_1 %49
OpLine %10 231 12
OpBranch %56
%58 = OpLabel
OpLine %10 234 16
%60 = OpCompositeInsert %core__option__Option_usize_ %uint_0 %31 0
OpLine %10 231 12
OpBranch %56
%56 = OpLabel
%61 = OpPhi %core__option__Option_usize_ %59 %57 %60 %58
OpLine %10 236 9
%62 = OpCompositeExtract %uint %61 0
%63 = OpCompositeExtract %uint %61 1
OpLine %7 744 14
%64 = OpBitcast %int %62
OpLine %7 744 8
OpSelectionMerge %65 None
OpSwitch %64 %66 0 %67 1 %68
%66 = OpLabel
OpLine %7 744 14
OpUnreachable
%67 = OpLabel
OpLine %8 28 8
OpBranch %69
%69 = OpLabel
OpBranch %70
%70 = OpLabel
%71 = OpPhi %bool %true %69 %true %72
OpLoopMerge %73 %72 None
OpBranchConditional %71 %74 %73
%74 = OpLabel
OpBranch %72
%72 = OpLabel
OpBranch %70
%73 = OpLabel
OpUnreachable
%68 = OpLabel
OpLine %12 190 7
%75 = OpIEqual %bool %63 %uint_0
OpSelectionMerge %76 None
OpBranchConditional %75 %77 %78
%77 = OpLabel
OpLine %16 126 13
OpBranch %76
%78 = OpLabel
OpBranch %79
%79 = OpLabel
%80 = OpPhi %bool %true %78 %81 %82
%83 = OpPhi %float %48 %78 %84 %82
%85 = OpPhi %float %39 %78 %86 %82
%87 = OpPhi %uint %63 %78 %88 %82
%89 = OpPhi %bool %false %78 %90 %82
%91 = OpPhi %bool %true %78 %92 %82
OpLoopMerge %93 %82 None
OpBranchConditional %91 %94 %93
%94 = OpLabel
OpLine %12 194 10
%95 = OpBitwiseAnd %uint %87 %uint_1
OpLine %12 194 10
%96 = OpIEqual %bool %95 %uint_0
OpSelectionMerge %97 None
OpBranchConditional %96 %98 %99
%98 = OpLabel
OpLine %14 334 44
%100 = OpFMul %float %83 %83
OpLine %12 196 8
%101 = OpBitwiseAnd %int %int_1 %int_31
%102 = OpShiftRightLogical %uint %87 %101
OpLine %12 194 4
OpBranch %97
%99 = OpLabel
OpLine %12 198 7
%103 = OpIEqual %bool %87 %uint_1
OpSelectionMerge %104 None
OpBranchConditional %103 %105 %106
%105 = OpLabel
OpLine %13 1 0
OpBranch %104
%106 = OpLabel
OpLine %12 203 4
OpBranch %107
%107 = OpLabel
OpBranch %108
%108 = OpLabel
%109 = OpPhi %bool %80 %107 %110 %111
%112 = OpPhi %float %83 %107 %113 %111
%114 = OpPhi %float %83 %107 %115 %111
%116 = OpPhi %float %85 %107 %117 %111
%118 = OpPhi %uint %87 %107 %119 %111
%120 = OpPhi %bool %true %107 %121 %111
OpLoopMerge %122 %111 None
OpBranchConditional %120 %123 %122
%123 = OpLabel
OpLine %12 203 10
%124 = OpUGreaterThan %bool %118 %uint_1
OpLine %12 203 10
OpSelectionMerge %125 None
OpBranchConditional %124 %126 %127
%126 = OpLabel
OpLine %12 204 8
%128 = OpBitwiseAnd %int %int_1 %int_31
%129 = OpShiftRightLogical %uint %118 %128
OpLine %14 334 44
%130 = OpFMul %float %112 %112
OpLine %12 206 11
%131 = OpBitwiseAnd %uint %129 %uint_1
OpLine %12 206 11
%132 = OpIEqual %bool %131 %uint_1
OpSelectionMerge %133 None
OpBranchConditional %132 %134 %135
%134 = OpLabel
OpLine %14 334 44
%136 = OpFMul %float %114 %130
OpLine %12 206 8
OpBranch %133
%135 = OpLabel
OpBranch %133
%133 = OpLabel
%137 = OpPhi %float %136 %134 %114 %135
%138 = OpPhi %bool %true %134 %true %135
OpBranch %125
%127 = OpLabel
OpLine %12 211 0
OpBranch %125
%125 = OpLabel
%110 = OpPhi %bool %true %133 %109 %127
%113 = OpPhi %float %130 %133 %112 %127
%115 = OpPhi %float %137 %133 %114 %127
%117 = OpPhi %float %116 %133 %114 %127
%119 = OpPhi %uint %129 %133 %118 %127
%121 = OpPhi %bool %138 %133 %false %127
OpBranch %111
%111 = OpLabel
OpBranch %108
%122 = OpLabel
OpBranch %104
%104 = OpLabel
%139 = OpPhi %bool %false %105 %109 %122
%140 = OpPhi %float %83 %105 %112 %122
%141 = OpPhi %float %83 %105 %116 %122
%142 = OpPhi %uint %87 %105 %118 %122
%143 = OpPhi %bool %true %105 %false %122
OpBranch %97
%97 = OpLabel
%81 = OpPhi %bool %true %98 %139 %104
%84 = OpPhi %float %100 %98 %140 %104
%86 = OpPhi %float %85 %98 %141 %104
%88 = OpPhi %uint %102 %98 %142 %104
%92 = OpPhi %bool %true %98 %false %104
%90 = OpPhi %bool %false %98 %143 %104
OpBranch %82
%82 = OpLabel
OpBranch %79
%93 = OpLabel
OpBranch %76
%76 = OpLabel
%144 = OpPhi %bool %true %77 %80 %93
%145 = OpPhi %float %float_1 %77 %85 %93
%146 = OpPhi %bool %true %77 %89 %93
OpSelectionMerge %147 None
OpBranchConditional %146 %148 %149
%148 = OpLabel
OpLine %12 211 0
OpSelectionMerge %150 None
OpBranchConditional %144 %151 %152
%151 = OpLabel
OpLine %12 211 0
OpBranch %150
%152 = OpLabel
OpBranch %150
%150 = OpLabel
OpBranch %147
%149 = OpLabel
OpBranch %147
%147 = OpLabel
OpBranch %153
%153 = OpLabel
OpLine %11 9 12
%154 = OpFOrdEqual %bool %145 %float_3125
OpLine %11 9 4
%155 = OpLogicalNotEqual %bool %154 %true
OpLine %11 9 4
OpSelectionMerge %156 None
OpBranchConditional %155 %157 %158
%157 = OpLabel
OpLine %11 9 4
OpBranch %159
%159 = OpLabel
OpBranch %160
%160 = OpLabel
%161 = OpPhi %bool %true %159 %true %162
OpLoopMerge %163 %162 None
OpBranchConditional %161 %164 %163
%164 = OpLabel
OpBranch %162
%162 = OpLabel
OpBranch %160
%163 = OpLabel
OpUnreachable
%158 = OpLabel
OpLine %11 10 1
OpReturn
%156 = OpLabel
OpUnreachable
%65 = OpLabel
OpUnreachable
OpFunctionEnd
%1 = OpFunction %void None %32
%165 = OpLabel
OpLine %11 7 0
%166 = OpFunctionCall %void %powi__main
OpReturn
OpFunctionEnd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment