Skip to content

Commit 4b57940

Browse files
committed
Add more fp casts
1 parent 20450fb commit 4b57940

File tree

4 files changed

+940
-1
lines changed

4 files changed

+940
-1
lines changed

data-castfp-fullfp16.json

Lines changed: 256 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2110,5 +2110,261 @@
21102110
"giasm": "ucvtf v0.2d, v0.2d\nucvtf v1.2d, v1.2d\nret",
21112111
"ll": "define <4 x double> @test(<4 x i64> %a) {\n %r = uitofp <4 x i64> %a to <4 x double>\n ret <4 x double> %r\n}",
21122112
"costoutput": "Printing analysis 'Cost Model Analysis' for function 'test':\nCost Model: Found an estimated cost of 1 for instruction: %r = uitofp <4 x i64> %a to <4 x double>\nCost Model: Found an estimated cost of 1 for instruction: ret <4 x double> %r"
2113+
},
2114+
{
2115+
"instr": "fpext",
2116+
"ty": "half",
2117+
"variant": "cast float",
2118+
"codesize": 1,
2119+
"thru": 1,
2120+
"lat": 1,
2121+
"sizelat": 1,
2122+
"size": 1,
2123+
"gisize": 1,
2124+
"extrasize": 0,
2125+
"asm": "fcvt s0, h0\nret",
2126+
"giasm": "fcvt s0, h0\nret",
2127+
"ll": "define float @test(half %a) {\n %r = fpext half %a to float\n ret float %r\n}",
2128+
"costoutput": "Printing analysis 'Cost Model Analysis' for function 'test':\nCost Model: Found an estimated cost of 1 for instruction: %r = fpext half %a to float\nCost Model: Found an estimated cost of 1 for instruction: ret float %r"
2129+
},
2130+
{
2131+
"instr": "fpext",
2132+
"ty": "half",
2133+
"variant": "cast double",
2134+
"codesize": 1,
2135+
"thru": 1,
2136+
"lat": 1,
2137+
"sizelat": 1,
2138+
"size": 1,
2139+
"gisize": 1,
2140+
"extrasize": 0,
2141+
"asm": "fcvt d0, h0\nret",
2142+
"giasm": "fcvt d0, h0\nret",
2143+
"ll": "define double @test(half %a) {\n %r = fpext half %a to double\n ret double %r\n}",
2144+
"costoutput": "Printing analysis 'Cost Model Analysis' for function 'test':\nCost Model: Found an estimated cost of 1 for instruction: %r = fpext half %a to double\nCost Model: Found an estimated cost of 1 for instruction: ret double %r"
2145+
},
2146+
{
2147+
"instr": "fpext",
2148+
"ty": "float",
2149+
"variant": "cast double",
2150+
"codesize": 1,
2151+
"thru": 1,
2152+
"lat": 1,
2153+
"sizelat": 1,
2154+
"size": 1,
2155+
"gisize": 1,
2156+
"extrasize": 0,
2157+
"asm": "fcvt d0, s0\nret",
2158+
"giasm": "fcvt d0, s0\nret",
2159+
"ll": "define double @test(float %a) {\n %r = fpext float %a to double\n ret double %r\n}",
2160+
"costoutput": "Printing analysis 'Cost Model Analysis' for function 'test':\nCost Model: Found an estimated cost of 1 for instruction: %r = fpext float %a to double\nCost Model: Found an estimated cost of 1 for instruction: ret double %r"
2161+
},
2162+
{
2163+
"instr": "fpext",
2164+
"ty": "<4 x half>",
2165+
"variant": "cast float",
2166+
"codesize": 1,
2167+
"thru": 1,
2168+
"lat": 1,
2169+
"sizelat": 1,
2170+
"size": 1,
2171+
"gisize": 1,
2172+
"extrasize": 0,
2173+
"asm": "fcvtl v0.4s, v0.4h\nret",
2174+
"giasm": "fcvtl v0.4s, v0.4h\nret",
2175+
"ll": "define <4 x float> @test(<4 x half> %a) {\n %r = fpext <4 x half> %a to <4 x float>\n ret <4 x float> %r\n}",
2176+
"costoutput": "Printing analysis 'Cost Model Analysis' for function 'test':\nCost Model: Found an estimated cost of 1 for instruction: %r = fpext <4 x half> %a to <4 x float>\nCost Model: Found an estimated cost of 1 for instruction: ret <4 x float> %r"
2177+
},
2178+
{
2179+
"instr": "fpext",
2180+
"ty": "<4 x half>",
2181+
"variant": "cast double",
2182+
"codesize": 1,
2183+
"thru": 3,
2184+
"lat": 1,
2185+
"sizelat": 1,
2186+
"size": 3,
2187+
"gisize": 9,
2188+
"extrasize": 0,
2189+
"asm": "fcvtl v0.4s, v0.4h\nfcvtl2 v1.2d, v0.4s\nfcvtl v0.2d, v0.2s\nret",
2190+
"giasm": "mov h1, v0.h[1]\nmov h2, v0.h[2]\nmov h3, v0.h[3]\nfcvt d0, h0\nfcvt d4, h1\nfcvt d1, h2\nfcvt d2, h3\nmov v0.d[1], v4.d[0]\nmov v1.d[1], v2.d[0]\nret",
2191+
"ll": "define <4 x double> @test(<4 x half> %a) {\n %r = fpext <4 x half> %a to <4 x double>\n ret <4 x double> %r\n}",
2192+
"costoutput": "Printing analysis 'Cost Model Analysis' for function 'test':\nCost Model: Found an estimated cost of 1 for instruction: %r = fpext <4 x half> %a to <4 x double>\nCost Model: Found an estimated cost of 1 for instruction: ret <4 x double> %r"
2193+
},
2194+
{
2195+
"instr": "fpext",
2196+
"ty": "<8 x half>",
2197+
"variant": "cast float",
2198+
"codesize": 1,
2199+
"thru": 2,
2200+
"lat": 1,
2201+
"sizelat": 1,
2202+
"size": 2,
2203+
"gisize": 3,
2204+
"extrasize": 0,
2205+
"asm": "fcvtl2 v1.4s, v0.8h\nfcvtl v0.4s, v0.4h\nret",
2206+
"giasm": "fcvtl v2.4s, v0.4h\nfcvtl2 v1.4s, v0.8h\nmov v0.16b, v2.16b\nret",
2207+
"ll": "define <8 x float> @test(<8 x half> %a) {\n %r = fpext <8 x half> %a to <8 x float>\n ret <8 x float> %r\n}",
2208+
"costoutput": "Printing analysis 'Cost Model Analysis' for function 'test':\nCost Model: Found an estimated cost of 1 for instruction: %r = fpext <8 x half> %a to <8 x float>\nCost Model: Found an estimated cost of 1 for instruction: ret <8 x float> %r"
2209+
},
2210+
{
2211+
"instr": "fpext",
2212+
"ty": "<2 x float>",
2213+
"variant": "cast double",
2214+
"codesize": 1,
2215+
"thru": 1,
2216+
"lat": 1,
2217+
"sizelat": 1,
2218+
"size": 1,
2219+
"gisize": 1,
2220+
"extrasize": 0,
2221+
"asm": "fcvtl v0.2d, v0.2s\nret",
2222+
"giasm": "fcvtl v0.2d, v0.2s\nret",
2223+
"ll": "define <2 x double> @test(<2 x float> %a) {\n %r = fpext <2 x float> %a to <2 x double>\n ret <2 x double> %r\n}",
2224+
"costoutput": "Printing analysis 'Cost Model Analysis' for function 'test':\nCost Model: Found an estimated cost of 1 for instruction: %r = fpext <2 x float> %a to <2 x double>\nCost Model: Found an estimated cost of 1 for instruction: ret <2 x double> %r"
2225+
},
2226+
{
2227+
"instr": "fpext",
2228+
"ty": "<4 x float>",
2229+
"variant": "cast double",
2230+
"codesize": 1,
2231+
"thru": 2,
2232+
"lat": 1,
2233+
"sizelat": 1,
2234+
"size": 2,
2235+
"gisize": 3,
2236+
"extrasize": 0,
2237+
"asm": "fcvtl2 v1.2d, v0.4s\nfcvtl v0.2d, v0.2s\nret",
2238+
"giasm": "fcvtl v2.2d, v0.2s\nfcvtl2 v1.2d, v0.4s\nmov v0.16b, v2.16b\nret",
2239+
"ll": "define <4 x double> @test(<4 x float> %a) {\n %r = fpext <4 x float> %a to <4 x double>\n ret <4 x double> %r\n}",
2240+
"costoutput": "Printing analysis 'Cost Model Analysis' for function 'test':\nCost Model: Found an estimated cost of 1 for instruction: %r = fpext <4 x float> %a to <4 x double>\nCost Model: Found an estimated cost of 1 for instruction: ret <4 x double> %r"
2241+
},
2242+
{
2243+
"instr": "fptrunc",
2244+
"ty": "float",
2245+
"variant": "cast half",
2246+
"codesize": 1,
2247+
"thru": 1,
2248+
"lat": 1,
2249+
"sizelat": 1,
2250+
"size": 1,
2251+
"gisize": 1,
2252+
"extrasize": 0,
2253+
"asm": "fcvt h0, s0\nret",
2254+
"giasm": "fcvt h0, s0\nret",
2255+
"ll": "define half @test(float %a) {\n %r = fptrunc float %a to half\n ret half %r\n}",
2256+
"costoutput": "Printing analysis 'Cost Model Analysis' for function 'test':\nCost Model: Found an estimated cost of 1 for instruction: %r = fptrunc float %a to half\nCost Model: Found an estimated cost of 1 for instruction: ret half %r"
2257+
},
2258+
{
2259+
"instr": "fptrunc",
2260+
"ty": "double",
2261+
"variant": "cast half",
2262+
"codesize": 1,
2263+
"thru": 1,
2264+
"lat": 1,
2265+
"sizelat": 1,
2266+
"size": 1,
2267+
"gisize": 1,
2268+
"extrasize": 0,
2269+
"asm": "fcvt h0, d0\nret",
2270+
"giasm": "fcvt h0, d0\nret",
2271+
"ll": "define half @test(double %a) {\n %r = fptrunc double %a to half\n ret half %r\n}",
2272+
"costoutput": "Printing analysis 'Cost Model Analysis' for function 'test':\nCost Model: Found an estimated cost of 1 for instruction: %r = fptrunc double %a to half\nCost Model: Found an estimated cost of 1 for instruction: ret half %r"
2273+
},
2274+
{
2275+
"instr": "fptrunc",
2276+
"ty": "double",
2277+
"variant": "cast float",
2278+
"codesize": 1,
2279+
"thru": 1,
2280+
"lat": 1,
2281+
"sizelat": 1,
2282+
"size": 1,
2283+
"gisize": 1,
2284+
"extrasize": 0,
2285+
"asm": "fcvt s0, d0\nret",
2286+
"giasm": "fcvt s0, d0\nret",
2287+
"ll": "define float @test(double %a) {\n %r = fptrunc double %a to float\n ret float %r\n}",
2288+
"costoutput": "Printing analysis 'Cost Model Analysis' for function 'test':\nCost Model: Found an estimated cost of 1 for instruction: %r = fptrunc double %a to float\nCost Model: Found an estimated cost of 1 for instruction: ret float %r"
2289+
},
2290+
{
2291+
"instr": "fptrunc",
2292+
"ty": "<4 x float>",
2293+
"variant": "cast half",
2294+
"codesize": 1,
2295+
"thru": 1,
2296+
"lat": 1,
2297+
"sizelat": 1,
2298+
"size": 1,
2299+
"gisize": 1,
2300+
"extrasize": 0,
2301+
"asm": "fcvtn v0.4h, v0.4s\nret",
2302+
"giasm": "fcvtn v0.4h, v0.4s\nret",
2303+
"ll": "define <4 x half> @test(<4 x float> %a) {\n %r = fptrunc <4 x float> %a to <4 x half>\n ret <4 x half> %r\n}",
2304+
"costoutput": "Printing analysis 'Cost Model Analysis' for function 'test':\nCost Model: Found an estimated cost of 1 for instruction: %r = fptrunc <4 x float> %a to <4 x half>\nCost Model: Found an estimated cost of 1 for instruction: ret <4 x half> %r"
2305+
},
2306+
{
2307+
"instr": "fptrunc",
2308+
"ty": "<8 x float>",
2309+
"variant": "cast half",
2310+
"codesize": 1,
2311+
"thru": 2,
2312+
"lat": 1,
2313+
"sizelat": 1,
2314+
"size": 2,
2315+
"gisize": 2,
2316+
"extrasize": 0,
2317+
"asm": "fcvtn v0.4h, v0.4s\nfcvtn2 v0.8h, v1.4s\nret",
2318+
"giasm": "fcvtn v0.4h, v0.4s\nfcvtn2 v0.8h, v1.4s\nret",
2319+
"ll": "define <8 x half> @test(<8 x float> %a) {\n %r = fptrunc <8 x float> %a to <8 x half>\n ret <8 x half> %r\n}",
2320+
"costoutput": "Printing analysis 'Cost Model Analysis' for function 'test':\nCost Model: Found an estimated cost of 1 for instruction: %r = fptrunc <8 x float> %a to <8 x half>\nCost Model: Found an estimated cost of 1 for instruction: ret <8 x half> %r"
2321+
},
2322+
{
2323+
"instr": "fptrunc",
2324+
"ty": "<2 x double>",
2325+
"variant": "cast float",
2326+
"codesize": 1,
2327+
"thru": 1,
2328+
"lat": 1,
2329+
"sizelat": 1,
2330+
"size": 1,
2331+
"gisize": 1,
2332+
"extrasize": 0,
2333+
"asm": "fcvtn v0.2s, v0.2d\nret",
2334+
"giasm": "fcvtn v0.2s, v0.2d\nret",
2335+
"ll": "define <2 x float> @test(<2 x double> %a) {\n %r = fptrunc <2 x double> %a to <2 x float>\n ret <2 x float> %r\n}",
2336+
"costoutput": "Printing analysis 'Cost Model Analysis' for function 'test':\nCost Model: Found an estimated cost of 1 for instruction: %r = fptrunc <2 x double> %a to <2 x float>\nCost Model: Found an estimated cost of 1 for instruction: ret <2 x float> %r"
2337+
},
2338+
{
2339+
"instr": "fptrunc",
2340+
"ty": "<4 x double>",
2341+
"variant": "cast half",
2342+
"codesize": 1,
2343+
"thru": 3,
2344+
"lat": 1,
2345+
"sizelat": 1,
2346+
"size": 3,
2347+
"gisize": 9,
2348+
"extrasize": 0,
2349+
"asm": "fcvtxn v0.2s, v0.2d\nfcvtxn2 v0.4s, v1.2d\nfcvtn v0.4h, v0.4s\nret",
2350+
"giasm": "mov d2, v0.d[1]\nfcvt h0, d0\nmov d3, v1.d[1]\nfcvt h1, d1\nfcvt h2, d2\nmov v0.h[1], v2.h[0]\nfcvt h2, d3\nmov v0.h[2], v1.h[0]\nmov v0.h[3], v2.h[0]\nret",
2351+
"ll": "define <4 x half> @test(<4 x double> %a) {\n %r = fptrunc <4 x double> %a to <4 x half>\n ret <4 x half> %r\n}",
2352+
"costoutput": "Printing analysis 'Cost Model Analysis' for function 'test':\nCost Model: Found an estimated cost of 1 for instruction: %r = fptrunc <4 x double> %a to <4 x half>\nCost Model: Found an estimated cost of 1 for instruction: ret <4 x half> %r"
2353+
},
2354+
{
2355+
"instr": "fptrunc",
2356+
"ty": "<4 x double>",
2357+
"variant": "cast float",
2358+
"codesize": 1,
2359+
"thru": 2,
2360+
"lat": 1,
2361+
"sizelat": 1,
2362+
"size": 2,
2363+
"gisize": 2,
2364+
"extrasize": 0,
2365+
"asm": "fcvtn v0.2s, v0.2d\nfcvtn2 v0.4s, v1.2d\nret",
2366+
"giasm": "fcvtn v0.2s, v0.2d\nfcvtn2 v0.4s, v1.2d\nret",
2367+
"ll": "define <4 x float> @test(<4 x double> %a) {\n %r = fptrunc <4 x double> %a to <4 x float>\n ret <4 x float> %r\n}",
2368+
"costoutput": "Printing analysis 'Cost Model Analysis' for function 'test':\nCost Model: Found an estimated cost of 1 for instruction: %r = fptrunc <4 x double> %a to <4 x float>\nCost Model: Found an estimated cost of 1 for instruction: ret <4 x float> %r"
21132369
}
21142370
]

0 commit comments

Comments
 (0)