2852 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -mattr="+wavefrontsize64" < %s | FileCheck -check-prefixes=GFX11,GFX11-SDAG %s3; RUN: llc -global-isel -mtriple=amdgcn -mcpu=gfx1100 -mattr="+wavefrontsize64" < %s | FileCheck -check-prefixes=GFX11,GFX11-GISEL %s4; RUN: llc -mtriple=amdgcn -mcpu=gfx900 < %s | FileCheck -check-prefixes=GFX9,GFX9-SDAG %s5; RUN: llc -global-isel -mtriple=amdgcn -mcpu=gfx900 < %s | FileCheck -check-prefixes=GFX9,GFX9-GISEL %s6; RUN: llc -mtriple=amdgcn -mcpu=fiji < %s | FileCheck -check-prefixes=VI-SDAG %s7; RUN: llc -global-isel -mtriple=amdgcn -mcpu=fiji < %s | FileCheck -check-prefixes=VI-GISEL %s8 9declare i64 @llvm.amdgcn.fcmp.f32(float, float, i32) #010declare i64 @llvm.amdgcn.fcmp.f64(double, double, i32) #011declare float @llvm.fabs.f32(float) #012 13declare i64 @llvm.amdgcn.fcmp.f16(half, half, i32) #014declare half @llvm.fabs.f16(half) #015 16define amdgpu_kernel void @v_fcmp_f32_oeq_with_fabs(ptr addrspace(1) %out, float %src, float %a) {17; GFX11-LABEL: v_fcmp_f32_oeq_with_fabs:18; GFX11: ; %bb.0:19; GFX11-NEXT: s_load_b128 s[0:3], s[4:5], 0x2420; GFX11-NEXT: v_mov_b32_e32 v2, 021; GFX11-NEXT: s_waitcnt lgkmcnt(0)22; GFX11-NEXT: v_cmp_eq_f32_e64 s[2:3], s2, |s3|23; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)24; GFX11-NEXT: v_mov_b32_e32 v0, s225; GFX11-NEXT: v_mov_b32_e32 v1, s326; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]27; GFX11-NEXT: s_endpgm28;29; GFX9-LABEL: v_fcmp_f32_oeq_with_fabs:30; GFX9: ; %bb.0:31; GFX9-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x2432; GFX9-NEXT: v_mov_b32_e32 v2, 033; GFX9-NEXT: s_waitcnt lgkmcnt(0)34; GFX9-NEXT: v_mov_b32_e32 v0, s335; GFX9-NEXT: v_cmp_eq_f32_e64 s[2:3], s2, |v0|36; GFX9-NEXT: v_mov_b32_e32 v0, s237; GFX9-NEXT: v_mov_b32_e32 v1, s338; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]39; GFX9-NEXT: s_endpgm40;41; VI-SDAG-LABEL: v_fcmp_f32_oeq_with_fabs:42; VI-SDAG: ; %bb.0:43; VI-SDAG-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x2444; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)45; VI-SDAG-NEXT: v_mov_b32_e32 v0, s346; VI-SDAG-NEXT: v_cmp_eq_f32_e64 s[2:3], s2, |v0|47; VI-SDAG-NEXT: v_mov_b32_e32 v0, s048; VI-SDAG-NEXT: v_mov_b32_e32 v2, s249; VI-SDAG-NEXT: v_mov_b32_e32 v1, s150; VI-SDAG-NEXT: v_mov_b32_e32 v3, s351; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]52; VI-SDAG-NEXT: s_endpgm53;54; VI-GISEL-LABEL: v_fcmp_f32_oeq_with_fabs:55; VI-GISEL: ; %bb.0:56; VI-GISEL-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x2457; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)58; VI-GISEL-NEXT: v_mov_b32_e32 v0, s359; VI-GISEL-NEXT: v_cmp_eq_f32_e64 s[2:3], s2, |v0|60; VI-GISEL-NEXT: v_mov_b32_e32 v0, s261; VI-GISEL-NEXT: v_mov_b32_e32 v3, s162; VI-GISEL-NEXT: v_mov_b32_e32 v1, s363; VI-GISEL-NEXT: v_mov_b32_e32 v2, s064; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]65; VI-GISEL-NEXT: s_endpgm66 %temp = call float @llvm.fabs.f32(float %a)67 %result = call i64 @llvm.amdgcn.fcmp.f32(float %src, float %temp, i32 1)68 store i64 %result, ptr addrspace(1) %out69 ret void70}71 72define amdgpu_kernel void @v_fcmp_f32_oeq_both_operands_with_fabs(ptr addrspace(1) %out, float %src, float %a) {73; GFX11-LABEL: v_fcmp_f32_oeq_both_operands_with_fabs:74; GFX11: ; %bb.0:75; GFX11-NEXT: s_load_b128 s[0:3], s[4:5], 0x2476; GFX11-NEXT: v_mov_b32_e32 v2, 077; GFX11-NEXT: s_waitcnt lgkmcnt(0)78; GFX11-NEXT: v_cmp_eq_f32_e64 s[2:3], |s2|, |s3|79; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)80; GFX11-NEXT: v_mov_b32_e32 v0, s281; GFX11-NEXT: v_mov_b32_e32 v1, s382; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]83; GFX11-NEXT: s_endpgm84;85; GFX9-LABEL: v_fcmp_f32_oeq_both_operands_with_fabs:86; GFX9: ; %bb.0:87; GFX9-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x2488; GFX9-NEXT: v_mov_b32_e32 v2, 089; GFX9-NEXT: s_waitcnt lgkmcnt(0)90; GFX9-NEXT: v_mov_b32_e32 v0, s391; GFX9-NEXT: v_cmp_eq_f32_e64 s[2:3], |s2|, |v0|92; GFX9-NEXT: v_mov_b32_e32 v0, s293; GFX9-NEXT: v_mov_b32_e32 v1, s394; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]95; GFX9-NEXT: s_endpgm96;97; VI-SDAG-LABEL: v_fcmp_f32_oeq_both_operands_with_fabs:98; VI-SDAG: ; %bb.0:99; VI-SDAG-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x24100; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)101; VI-SDAG-NEXT: v_mov_b32_e32 v0, s3102; VI-SDAG-NEXT: v_cmp_eq_f32_e64 s[2:3], |s2|, |v0|103; VI-SDAG-NEXT: v_mov_b32_e32 v0, s0104; VI-SDAG-NEXT: v_mov_b32_e32 v2, s2105; VI-SDAG-NEXT: v_mov_b32_e32 v1, s1106; VI-SDAG-NEXT: v_mov_b32_e32 v3, s3107; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]108; VI-SDAG-NEXT: s_endpgm109;110; VI-GISEL-LABEL: v_fcmp_f32_oeq_both_operands_with_fabs:111; VI-GISEL: ; %bb.0:112; VI-GISEL-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x24113; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)114; VI-GISEL-NEXT: v_mov_b32_e32 v0, s3115; VI-GISEL-NEXT: v_cmp_eq_f32_e64 s[2:3], |s2|, |v0|116; VI-GISEL-NEXT: v_mov_b32_e32 v0, s2117; VI-GISEL-NEXT: v_mov_b32_e32 v3, s1118; VI-GISEL-NEXT: v_mov_b32_e32 v1, s3119; VI-GISEL-NEXT: v_mov_b32_e32 v2, s0120; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]121; VI-GISEL-NEXT: s_endpgm122 %temp = call float @llvm.fabs.f32(float %a)123 %src_input = call float @llvm.fabs.f32(float %src)124 %result = call i64 @llvm.amdgcn.fcmp.f32(float %src_input, float %temp, i32 1)125 store i64 %result, ptr addrspace(1) %out126 ret void127}128 129define amdgpu_kernel void @v_fcmp_f32(ptr addrspace(1) %out, float %src) {130; GFX11-SDAG-LABEL: v_fcmp_f32:131; GFX11-SDAG: ; %bb.0:132; GFX11-SDAG-NEXT: s_endpgm133;134; GFX11-GISEL-LABEL: v_fcmp_f32:135; GFX11-GISEL: ; %bb.0:136; GFX11-GISEL-NEXT: s_load_b64 s[0:1], s[4:5], 0x24137; GFX11-GISEL-NEXT: v_mov_b32_e32 v0, 0138; GFX11-GISEL-NEXT: s_waitcnt lgkmcnt(0)139; GFX11-GISEL-NEXT: global_store_b64 v0, v[0:1], s[0:1]140; GFX11-GISEL-NEXT: s_endpgm141;142; GFX9-SDAG-LABEL: v_fcmp_f32:143; GFX9-SDAG: ; %bb.0:144; GFX9-SDAG-NEXT: s_endpgm145;146; GFX9-GISEL-LABEL: v_fcmp_f32:147; GFX9-GISEL: ; %bb.0:148; GFX9-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24149; GFX9-GISEL-NEXT: v_mov_b32_e32 v0, 0150; GFX9-GISEL-NEXT: s_waitcnt lgkmcnt(0)151; GFX9-GISEL-NEXT: global_store_dwordx2 v0, v[0:1], s[0:1]152; GFX9-GISEL-NEXT: s_endpgm153;154; VI-SDAG-LABEL: v_fcmp_f32:155; VI-SDAG: ; %bb.0:156; VI-SDAG-NEXT: s_endpgm157;158; VI-GISEL-LABEL: v_fcmp_f32:159; VI-GISEL: ; %bb.0:160; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24161; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)162; VI-GISEL-NEXT: v_mov_b32_e32 v0, s0163; VI-GISEL-NEXT: v_mov_b32_e32 v1, s1164; VI-GISEL-NEXT: flat_store_dwordx2 v[0:1], v[0:1]165; VI-GISEL-NEXT: s_endpgm166 %result = call i64 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 -1)167 store i64 %result, ptr addrspace(1) %out168 ret void169}170 171define amdgpu_kernel void @v_fcmp_f32_oeq(ptr addrspace(1) %out, float %src) {172; GFX11-LABEL: v_fcmp_f32_oeq:173; GFX11: ; %bb.0:174; GFX11-NEXT: s_clause 0x1175; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c176; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x24177; GFX11-NEXT: v_mov_b32_e32 v2, 0178; GFX11-NEXT: s_waitcnt lgkmcnt(0)179; GFX11-NEXT: v_cmp_eq_f32_e64 s[2:3], 0x42c80000, s2180; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)181; GFX11-NEXT: v_mov_b32_e32 v0, s2182; GFX11-NEXT: v_mov_b32_e32 v1, s3183; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]184; GFX11-NEXT: s_endpgm185;186; GFX9-LABEL: v_fcmp_f32_oeq:187; GFX9: ; %bb.0:188; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c189; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24190; GFX9-NEXT: v_mov_b32_e32 v0, 0x42c80000191; GFX9-NEXT: v_mov_b32_e32 v2, 0192; GFX9-NEXT: s_waitcnt lgkmcnt(0)193; GFX9-NEXT: v_cmp_eq_f32_e64 s[2:3], s2, v0194; GFX9-NEXT: v_mov_b32_e32 v0, s2195; GFX9-NEXT: v_mov_b32_e32 v1, s3196; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]197; GFX9-NEXT: s_endpgm198;199; VI-SDAG-LABEL: v_fcmp_f32_oeq:200; VI-SDAG: ; %bb.0:201; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c202; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24203; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x42c80000204; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)205; VI-SDAG-NEXT: v_cmp_eq_f32_e64 s[2:3], s2, v0206; VI-SDAG-NEXT: v_mov_b32_e32 v0, s0207; VI-SDAG-NEXT: v_mov_b32_e32 v2, s2208; VI-SDAG-NEXT: v_mov_b32_e32 v1, s1209; VI-SDAG-NEXT: v_mov_b32_e32 v3, s3210; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]211; VI-SDAG-NEXT: s_endpgm212;213; VI-GISEL-LABEL: v_fcmp_f32_oeq:214; VI-GISEL: ; %bb.0:215; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c216; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24217; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x42c80000218; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)219; VI-GISEL-NEXT: v_cmp_eq_f32_e64 s[2:3], s2, v0220; VI-GISEL-NEXT: v_mov_b32_e32 v0, s2221; VI-GISEL-NEXT: v_mov_b32_e32 v3, s1222; VI-GISEL-NEXT: v_mov_b32_e32 v1, s3223; VI-GISEL-NEXT: v_mov_b32_e32 v2, s0224; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]225; VI-GISEL-NEXT: s_endpgm226 %result = call i64 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 1)227 store i64 %result, ptr addrspace(1) %out228 ret void229}230 231define amdgpu_kernel void @v_fcmp_f32_one(ptr addrspace(1) %out, float %src) {232; GFX11-LABEL: v_fcmp_f32_one:233; GFX11: ; %bb.0:234; GFX11-NEXT: s_clause 0x1235; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c236; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x24237; GFX11-NEXT: v_mov_b32_e32 v2, 0238; GFX11-NEXT: s_waitcnt lgkmcnt(0)239; GFX11-NEXT: v_cmp_neq_f32_e64 s[2:3], 0x42c80000, s2240; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)241; GFX11-NEXT: v_mov_b32_e32 v0, s2242; GFX11-NEXT: v_mov_b32_e32 v1, s3243; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]244; GFX11-NEXT: s_endpgm245;246; GFX9-LABEL: v_fcmp_f32_one:247; GFX9: ; %bb.0:248; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c249; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24250; GFX9-NEXT: v_mov_b32_e32 v0, 0x42c80000251; GFX9-NEXT: v_mov_b32_e32 v2, 0252; GFX9-NEXT: s_waitcnt lgkmcnt(0)253; GFX9-NEXT: v_cmp_neq_f32_e64 s[2:3], s2, v0254; GFX9-NEXT: v_mov_b32_e32 v0, s2255; GFX9-NEXT: v_mov_b32_e32 v1, s3256; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]257; GFX9-NEXT: s_endpgm258;259; VI-SDAG-LABEL: v_fcmp_f32_one:260; VI-SDAG: ; %bb.0:261; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c262; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24263; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x42c80000264; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)265; VI-SDAG-NEXT: v_cmp_neq_f32_e64 s[2:3], s2, v0266; VI-SDAG-NEXT: v_mov_b32_e32 v0, s0267; VI-SDAG-NEXT: v_mov_b32_e32 v2, s2268; VI-SDAG-NEXT: v_mov_b32_e32 v1, s1269; VI-SDAG-NEXT: v_mov_b32_e32 v3, s3270; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]271; VI-SDAG-NEXT: s_endpgm272;273; VI-GISEL-LABEL: v_fcmp_f32_one:274; VI-GISEL: ; %bb.0:275; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c276; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24277; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x42c80000278; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)279; VI-GISEL-NEXT: v_cmp_neq_f32_e64 s[2:3], s2, v0280; VI-GISEL-NEXT: v_mov_b32_e32 v0, s2281; VI-GISEL-NEXT: v_mov_b32_e32 v3, s1282; VI-GISEL-NEXT: v_mov_b32_e32 v1, s3283; VI-GISEL-NEXT: v_mov_b32_e32 v2, s0284; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]285; VI-GISEL-NEXT: s_endpgm286 %result = call i64 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 6)287 store i64 %result, ptr addrspace(1) %out288 ret void289}290 291define amdgpu_kernel void @v_fcmp_f32_ogt(ptr addrspace(1) %out, float %src) {292; GFX11-LABEL: v_fcmp_f32_ogt:293; GFX11: ; %bb.0:294; GFX11-NEXT: s_clause 0x1295; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c296; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x24297; GFX11-NEXT: v_mov_b32_e32 v2, 0298; GFX11-NEXT: s_waitcnt lgkmcnt(0)299; GFX11-NEXT: v_cmp_lt_f32_e64 s[2:3], 0x42c80000, s2300; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)301; GFX11-NEXT: v_mov_b32_e32 v0, s2302; GFX11-NEXT: v_mov_b32_e32 v1, s3303; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]304; GFX11-NEXT: s_endpgm305;306; GFX9-LABEL: v_fcmp_f32_ogt:307; GFX9: ; %bb.0:308; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c309; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24310; GFX9-NEXT: v_mov_b32_e32 v0, 0x42c80000311; GFX9-NEXT: v_mov_b32_e32 v2, 0312; GFX9-NEXT: s_waitcnt lgkmcnt(0)313; GFX9-NEXT: v_cmp_gt_f32_e64 s[2:3], s2, v0314; GFX9-NEXT: v_mov_b32_e32 v0, s2315; GFX9-NEXT: v_mov_b32_e32 v1, s3316; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]317; GFX9-NEXT: s_endpgm318;319; VI-SDAG-LABEL: v_fcmp_f32_ogt:320; VI-SDAG: ; %bb.0:321; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c322; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24323; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x42c80000324; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)325; VI-SDAG-NEXT: v_cmp_gt_f32_e64 s[2:3], s2, v0326; VI-SDAG-NEXT: v_mov_b32_e32 v0, s0327; VI-SDAG-NEXT: v_mov_b32_e32 v2, s2328; VI-SDAG-NEXT: v_mov_b32_e32 v1, s1329; VI-SDAG-NEXT: v_mov_b32_e32 v3, s3330; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]331; VI-SDAG-NEXT: s_endpgm332;333; VI-GISEL-LABEL: v_fcmp_f32_ogt:334; VI-GISEL: ; %bb.0:335; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c336; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24337; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x42c80000338; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)339; VI-GISEL-NEXT: v_cmp_gt_f32_e64 s[2:3], s2, v0340; VI-GISEL-NEXT: v_mov_b32_e32 v0, s2341; VI-GISEL-NEXT: v_mov_b32_e32 v3, s1342; VI-GISEL-NEXT: v_mov_b32_e32 v1, s3343; VI-GISEL-NEXT: v_mov_b32_e32 v2, s0344; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]345; VI-GISEL-NEXT: s_endpgm346 %result = call i64 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 2)347 store i64 %result, ptr addrspace(1) %out348 ret void349}350 351define amdgpu_kernel void @v_fcmp_f32_oge(ptr addrspace(1) %out, float %src) {352; GFX11-LABEL: v_fcmp_f32_oge:353; GFX11: ; %bb.0:354; GFX11-NEXT: s_clause 0x1355; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c356; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x24357; GFX11-NEXT: v_mov_b32_e32 v2, 0358; GFX11-NEXT: s_waitcnt lgkmcnt(0)359; GFX11-NEXT: v_cmp_le_f32_e64 s[2:3], 0x42c80000, s2360; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)361; GFX11-NEXT: v_mov_b32_e32 v0, s2362; GFX11-NEXT: v_mov_b32_e32 v1, s3363; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]364; GFX11-NEXT: s_endpgm365;366; GFX9-LABEL: v_fcmp_f32_oge:367; GFX9: ; %bb.0:368; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c369; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24370; GFX9-NEXT: v_mov_b32_e32 v0, 0x42c80000371; GFX9-NEXT: v_mov_b32_e32 v2, 0372; GFX9-NEXT: s_waitcnt lgkmcnt(0)373; GFX9-NEXT: v_cmp_ge_f32_e64 s[2:3], s2, v0374; GFX9-NEXT: v_mov_b32_e32 v0, s2375; GFX9-NEXT: v_mov_b32_e32 v1, s3376; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]377; GFX9-NEXT: s_endpgm378;379; VI-SDAG-LABEL: v_fcmp_f32_oge:380; VI-SDAG: ; %bb.0:381; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c382; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24383; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x42c80000384; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)385; VI-SDAG-NEXT: v_cmp_ge_f32_e64 s[2:3], s2, v0386; VI-SDAG-NEXT: v_mov_b32_e32 v0, s0387; VI-SDAG-NEXT: v_mov_b32_e32 v2, s2388; VI-SDAG-NEXT: v_mov_b32_e32 v1, s1389; VI-SDAG-NEXT: v_mov_b32_e32 v3, s3390; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]391; VI-SDAG-NEXT: s_endpgm392;393; VI-GISEL-LABEL: v_fcmp_f32_oge:394; VI-GISEL: ; %bb.0:395; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c396; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24397; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x42c80000398; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)399; VI-GISEL-NEXT: v_cmp_ge_f32_e64 s[2:3], s2, v0400; VI-GISEL-NEXT: v_mov_b32_e32 v0, s2401; VI-GISEL-NEXT: v_mov_b32_e32 v3, s1402; VI-GISEL-NEXT: v_mov_b32_e32 v1, s3403; VI-GISEL-NEXT: v_mov_b32_e32 v2, s0404; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]405; VI-GISEL-NEXT: s_endpgm406 %result = call i64 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 3)407 store i64 %result, ptr addrspace(1) %out408 ret void409}410 411define amdgpu_kernel void @v_fcmp_f32_olt(ptr addrspace(1) %out, float %src) {412; GFX11-LABEL: v_fcmp_f32_olt:413; GFX11: ; %bb.0:414; GFX11-NEXT: s_clause 0x1415; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c416; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x24417; GFX11-NEXT: v_mov_b32_e32 v2, 0418; GFX11-NEXT: s_waitcnt lgkmcnt(0)419; GFX11-NEXT: v_cmp_gt_f32_e64 s[2:3], 0x42c80000, s2420; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)421; GFX11-NEXT: v_mov_b32_e32 v0, s2422; GFX11-NEXT: v_mov_b32_e32 v1, s3423; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]424; GFX11-NEXT: s_endpgm425;426; GFX9-LABEL: v_fcmp_f32_olt:427; GFX9: ; %bb.0:428; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c429; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24430; GFX9-NEXT: v_mov_b32_e32 v0, 0x42c80000431; GFX9-NEXT: v_mov_b32_e32 v2, 0432; GFX9-NEXT: s_waitcnt lgkmcnt(0)433; GFX9-NEXT: v_cmp_lt_f32_e64 s[2:3], s2, v0434; GFX9-NEXT: v_mov_b32_e32 v0, s2435; GFX9-NEXT: v_mov_b32_e32 v1, s3436; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]437; GFX9-NEXT: s_endpgm438;439; VI-SDAG-LABEL: v_fcmp_f32_olt:440; VI-SDAG: ; %bb.0:441; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c442; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24443; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x42c80000444; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)445; VI-SDAG-NEXT: v_cmp_lt_f32_e64 s[2:3], s2, v0446; VI-SDAG-NEXT: v_mov_b32_e32 v0, s0447; VI-SDAG-NEXT: v_mov_b32_e32 v2, s2448; VI-SDAG-NEXT: v_mov_b32_e32 v1, s1449; VI-SDAG-NEXT: v_mov_b32_e32 v3, s3450; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]451; VI-SDAG-NEXT: s_endpgm452;453; VI-GISEL-LABEL: v_fcmp_f32_olt:454; VI-GISEL: ; %bb.0:455; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c456; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24457; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x42c80000458; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)459; VI-GISEL-NEXT: v_cmp_lt_f32_e64 s[2:3], s2, v0460; VI-GISEL-NEXT: v_mov_b32_e32 v0, s2461; VI-GISEL-NEXT: v_mov_b32_e32 v3, s1462; VI-GISEL-NEXT: v_mov_b32_e32 v1, s3463; VI-GISEL-NEXT: v_mov_b32_e32 v2, s0464; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]465; VI-GISEL-NEXT: s_endpgm466 %result = call i64 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 4)467 store i64 %result, ptr addrspace(1) %out468 ret void469}470 471define amdgpu_kernel void @v_fcmp_f32_ole(ptr addrspace(1) %out, float %src) {472; GFX11-LABEL: v_fcmp_f32_ole:473; GFX11: ; %bb.0:474; GFX11-NEXT: s_clause 0x1475; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c476; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x24477; GFX11-NEXT: v_mov_b32_e32 v2, 0478; GFX11-NEXT: s_waitcnt lgkmcnt(0)479; GFX11-NEXT: v_cmp_ge_f32_e64 s[2:3], 0x42c80000, s2480; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)481; GFX11-NEXT: v_mov_b32_e32 v0, s2482; GFX11-NEXT: v_mov_b32_e32 v1, s3483; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]484; GFX11-NEXT: s_endpgm485;486; GFX9-LABEL: v_fcmp_f32_ole:487; GFX9: ; %bb.0:488; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c489; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24490; GFX9-NEXT: v_mov_b32_e32 v0, 0x42c80000491; GFX9-NEXT: v_mov_b32_e32 v2, 0492; GFX9-NEXT: s_waitcnt lgkmcnt(0)493; GFX9-NEXT: v_cmp_le_f32_e64 s[2:3], s2, v0494; GFX9-NEXT: v_mov_b32_e32 v0, s2495; GFX9-NEXT: v_mov_b32_e32 v1, s3496; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]497; GFX9-NEXT: s_endpgm498;499; VI-SDAG-LABEL: v_fcmp_f32_ole:500; VI-SDAG: ; %bb.0:501; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c502; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24503; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x42c80000504; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)505; VI-SDAG-NEXT: v_cmp_le_f32_e64 s[2:3], s2, v0506; VI-SDAG-NEXT: v_mov_b32_e32 v0, s0507; VI-SDAG-NEXT: v_mov_b32_e32 v2, s2508; VI-SDAG-NEXT: v_mov_b32_e32 v1, s1509; VI-SDAG-NEXT: v_mov_b32_e32 v3, s3510; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]511; VI-SDAG-NEXT: s_endpgm512;513; VI-GISEL-LABEL: v_fcmp_f32_ole:514; VI-GISEL: ; %bb.0:515; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c516; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24517; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x42c80000518; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)519; VI-GISEL-NEXT: v_cmp_le_f32_e64 s[2:3], s2, v0520; VI-GISEL-NEXT: v_mov_b32_e32 v0, s2521; VI-GISEL-NEXT: v_mov_b32_e32 v3, s1522; VI-GISEL-NEXT: v_mov_b32_e32 v1, s3523; VI-GISEL-NEXT: v_mov_b32_e32 v2, s0524; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]525; VI-GISEL-NEXT: s_endpgm526 %result = call i64 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 5)527 store i64 %result, ptr addrspace(1) %out528 ret void529}530 531define amdgpu_kernel void @v_fcmp_f32_o(ptr addrspace(1) %out, float %src) {532; GFX11-LABEL: v_fcmp_f32_o:533; GFX11: ; %bb.0:534; GFX11-NEXT: s_clause 0x1535; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c536; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x24537; GFX11-NEXT: v_mov_b32_e32 v2, 0538; GFX11-NEXT: s_waitcnt lgkmcnt(0)539; GFX11-NEXT: v_cmp_o_f32_e64 s[2:3], 0x42c80000, s2540; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)541; GFX11-NEXT: v_mov_b32_e32 v0, s2542; GFX11-NEXT: v_mov_b32_e32 v1, s3543; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]544; GFX11-NEXT: s_endpgm545;546; GFX9-LABEL: v_fcmp_f32_o:547; GFX9: ; %bb.0:548; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c549; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24550; GFX9-NEXT: v_mov_b32_e32 v0, 0x42c80000551; GFX9-NEXT: v_mov_b32_e32 v2, 0552; GFX9-NEXT: s_waitcnt lgkmcnt(0)553; GFX9-NEXT: v_cmp_o_f32_e64 s[2:3], s2, v0554; GFX9-NEXT: v_mov_b32_e32 v0, s2555; GFX9-NEXT: v_mov_b32_e32 v1, s3556; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]557; GFX9-NEXT: s_endpgm558;559; VI-SDAG-LABEL: v_fcmp_f32_o:560; VI-SDAG: ; %bb.0:561; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c562; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24563; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x42c80000564; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)565; VI-SDAG-NEXT: v_cmp_o_f32_e64 s[2:3], s2, v0566; VI-SDAG-NEXT: v_mov_b32_e32 v0, s0567; VI-SDAG-NEXT: v_mov_b32_e32 v2, s2568; VI-SDAG-NEXT: v_mov_b32_e32 v1, s1569; VI-SDAG-NEXT: v_mov_b32_e32 v3, s3570; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]571; VI-SDAG-NEXT: s_endpgm572;573; VI-GISEL-LABEL: v_fcmp_f32_o:574; VI-GISEL: ; %bb.0:575; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c576; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24577; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x42c80000578; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)579; VI-GISEL-NEXT: v_cmp_o_f32_e64 s[2:3], s2, v0580; VI-GISEL-NEXT: v_mov_b32_e32 v0, s2581; VI-GISEL-NEXT: v_mov_b32_e32 v3, s1582; VI-GISEL-NEXT: v_mov_b32_e32 v1, s3583; VI-GISEL-NEXT: v_mov_b32_e32 v2, s0584; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]585; VI-GISEL-NEXT: s_endpgm586 %result = call i64 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 7)587 store i64 %result, ptr addrspace(1) %out588 ret void589}590 591define amdgpu_kernel void @v_fcmp_f32_uo(ptr addrspace(1) %out, float %src) {592; GFX11-LABEL: v_fcmp_f32_uo:593; GFX11: ; %bb.0:594; GFX11-NEXT: s_clause 0x1595; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c596; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x24597; GFX11-NEXT: v_mov_b32_e32 v2, 0598; GFX11-NEXT: s_waitcnt lgkmcnt(0)599; GFX11-NEXT: v_cmp_u_f32_e64 s[2:3], 0x42c80000, s2600; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)601; GFX11-NEXT: v_mov_b32_e32 v0, s2602; GFX11-NEXT: v_mov_b32_e32 v1, s3603; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]604; GFX11-NEXT: s_endpgm605;606; GFX9-LABEL: v_fcmp_f32_uo:607; GFX9: ; %bb.0:608; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c609; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24610; GFX9-NEXT: v_mov_b32_e32 v0, 0x42c80000611; GFX9-NEXT: v_mov_b32_e32 v2, 0612; GFX9-NEXT: s_waitcnt lgkmcnt(0)613; GFX9-NEXT: v_cmp_u_f32_e64 s[2:3], s2, v0614; GFX9-NEXT: v_mov_b32_e32 v0, s2615; GFX9-NEXT: v_mov_b32_e32 v1, s3616; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]617; GFX9-NEXT: s_endpgm618;619; VI-SDAG-LABEL: v_fcmp_f32_uo:620; VI-SDAG: ; %bb.0:621; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c622; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24623; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x42c80000624; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)625; VI-SDAG-NEXT: v_cmp_u_f32_e64 s[2:3], s2, v0626; VI-SDAG-NEXT: v_mov_b32_e32 v0, s0627; VI-SDAG-NEXT: v_mov_b32_e32 v2, s2628; VI-SDAG-NEXT: v_mov_b32_e32 v1, s1629; VI-SDAG-NEXT: v_mov_b32_e32 v3, s3630; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]631; VI-SDAG-NEXT: s_endpgm632;633; VI-GISEL-LABEL: v_fcmp_f32_uo:634; VI-GISEL: ; %bb.0:635; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c636; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24637; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x42c80000638; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)639; VI-GISEL-NEXT: v_cmp_u_f32_e64 s[2:3], s2, v0640; VI-GISEL-NEXT: v_mov_b32_e32 v0, s2641; VI-GISEL-NEXT: v_mov_b32_e32 v3, s1642; VI-GISEL-NEXT: v_mov_b32_e32 v1, s3643; VI-GISEL-NEXT: v_mov_b32_e32 v2, s0644; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]645; VI-GISEL-NEXT: s_endpgm646 %result = call i64 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 8)647 store i64 %result, ptr addrspace(1) %out648 ret void649}650 651define amdgpu_kernel void @v_fcmp_f32_ueq(ptr addrspace(1) %out, float %src) {652; GFX11-LABEL: v_fcmp_f32_ueq:653; GFX11: ; %bb.0:654; GFX11-NEXT: s_clause 0x1655; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c656; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x24657; GFX11-NEXT: v_mov_b32_e32 v2, 0658; GFX11-NEXT: s_waitcnt lgkmcnt(0)659; GFX11-NEXT: v_cmp_nlg_f32_e64 s[2:3], 0x42c80000, s2660; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)661; GFX11-NEXT: v_mov_b32_e32 v0, s2662; GFX11-NEXT: v_mov_b32_e32 v1, s3663; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]664; GFX11-NEXT: s_endpgm665;666; GFX9-LABEL: v_fcmp_f32_ueq:667; GFX9: ; %bb.0:668; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c669; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24670; GFX9-NEXT: v_mov_b32_e32 v0, 0x42c80000671; GFX9-NEXT: v_mov_b32_e32 v2, 0672; GFX9-NEXT: s_waitcnt lgkmcnt(0)673; GFX9-NEXT: v_cmp_nlg_f32_e64 s[2:3], s2, v0674; GFX9-NEXT: v_mov_b32_e32 v0, s2675; GFX9-NEXT: v_mov_b32_e32 v1, s3676; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]677; GFX9-NEXT: s_endpgm678;679; VI-SDAG-LABEL: v_fcmp_f32_ueq:680; VI-SDAG: ; %bb.0:681; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c682; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24683; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x42c80000684; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)685; VI-SDAG-NEXT: v_cmp_nlg_f32_e64 s[2:3], s2, v0686; VI-SDAG-NEXT: v_mov_b32_e32 v0, s0687; VI-SDAG-NEXT: v_mov_b32_e32 v2, s2688; VI-SDAG-NEXT: v_mov_b32_e32 v1, s1689; VI-SDAG-NEXT: v_mov_b32_e32 v3, s3690; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]691; VI-SDAG-NEXT: s_endpgm692;693; VI-GISEL-LABEL: v_fcmp_f32_ueq:694; VI-GISEL: ; %bb.0:695; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c696; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24697; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x42c80000698; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)699; VI-GISEL-NEXT: v_cmp_nlg_f32_e64 s[2:3], s2, v0700; VI-GISEL-NEXT: v_mov_b32_e32 v0, s2701; VI-GISEL-NEXT: v_mov_b32_e32 v3, s1702; VI-GISEL-NEXT: v_mov_b32_e32 v1, s3703; VI-GISEL-NEXT: v_mov_b32_e32 v2, s0704; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]705; VI-GISEL-NEXT: s_endpgm706 %result = call i64 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 9)707 store i64 %result, ptr addrspace(1) %out708 ret void709}710 711define amdgpu_kernel void @v_fcmp_f32_une(ptr addrspace(1) %out, float %src) {712; GFX11-LABEL: v_fcmp_f32_une:713; GFX11: ; %bb.0:714; GFX11-NEXT: s_clause 0x1715; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c716; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x24717; GFX11-NEXT: v_mov_b32_e32 v2, 0718; GFX11-NEXT: s_waitcnt lgkmcnt(0)719; GFX11-NEXT: v_cmp_neq_f32_e64 s[2:3], 0x42c80000, s2720; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)721; GFX11-NEXT: v_mov_b32_e32 v0, s2722; GFX11-NEXT: v_mov_b32_e32 v1, s3723; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]724; GFX11-NEXT: s_endpgm725;726; GFX9-LABEL: v_fcmp_f32_une:727; GFX9: ; %bb.0:728; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c729; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24730; GFX9-NEXT: v_mov_b32_e32 v0, 0x42c80000731; GFX9-NEXT: v_mov_b32_e32 v2, 0732; GFX9-NEXT: s_waitcnt lgkmcnt(0)733; GFX9-NEXT: v_cmp_neq_f32_e64 s[2:3], s2, v0734; GFX9-NEXT: v_mov_b32_e32 v0, s2735; GFX9-NEXT: v_mov_b32_e32 v1, s3736; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]737; GFX9-NEXT: s_endpgm738;739; VI-SDAG-LABEL: v_fcmp_f32_une:740; VI-SDAG: ; %bb.0:741; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c742; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24743; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x42c80000744; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)745; VI-SDAG-NEXT: v_cmp_neq_f32_e64 s[2:3], s2, v0746; VI-SDAG-NEXT: v_mov_b32_e32 v0, s0747; VI-SDAG-NEXT: v_mov_b32_e32 v2, s2748; VI-SDAG-NEXT: v_mov_b32_e32 v1, s1749; VI-SDAG-NEXT: v_mov_b32_e32 v3, s3750; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]751; VI-SDAG-NEXT: s_endpgm752;753; VI-GISEL-LABEL: v_fcmp_f32_une:754; VI-GISEL: ; %bb.0:755; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c756; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24757; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x42c80000758; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)759; VI-GISEL-NEXT: v_cmp_neq_f32_e64 s[2:3], s2, v0760; VI-GISEL-NEXT: v_mov_b32_e32 v0, s2761; VI-GISEL-NEXT: v_mov_b32_e32 v3, s1762; VI-GISEL-NEXT: v_mov_b32_e32 v1, s3763; VI-GISEL-NEXT: v_mov_b32_e32 v2, s0764; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]765; VI-GISEL-NEXT: s_endpgm766 %result = call i64 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 14)767 store i64 %result, ptr addrspace(1) %out768 ret void769}770 771define amdgpu_kernel void @v_fcmp_f32_ugt(ptr addrspace(1) %out, float %src) {772; GFX11-LABEL: v_fcmp_f32_ugt:773; GFX11: ; %bb.0:774; GFX11-NEXT: s_clause 0x1775; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c776; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x24777; GFX11-NEXT: v_mov_b32_e32 v2, 0778; GFX11-NEXT: s_waitcnt lgkmcnt(0)779; GFX11-NEXT: v_cmp_nge_f32_e64 s[2:3], 0x42c80000, s2780; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)781; GFX11-NEXT: v_mov_b32_e32 v0, s2782; GFX11-NEXT: v_mov_b32_e32 v1, s3783; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]784; GFX11-NEXT: s_endpgm785;786; GFX9-LABEL: v_fcmp_f32_ugt:787; GFX9: ; %bb.0:788; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c789; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24790; GFX9-NEXT: v_mov_b32_e32 v0, 0x42c80000791; GFX9-NEXT: v_mov_b32_e32 v2, 0792; GFX9-NEXT: s_waitcnt lgkmcnt(0)793; GFX9-NEXT: v_cmp_nle_f32_e64 s[2:3], s2, v0794; GFX9-NEXT: v_mov_b32_e32 v0, s2795; GFX9-NEXT: v_mov_b32_e32 v1, s3796; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]797; GFX9-NEXT: s_endpgm798;799; VI-SDAG-LABEL: v_fcmp_f32_ugt:800; VI-SDAG: ; %bb.0:801; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c802; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24803; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x42c80000804; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)805; VI-SDAG-NEXT: v_cmp_nle_f32_e64 s[2:3], s2, v0806; VI-SDAG-NEXT: v_mov_b32_e32 v0, s0807; VI-SDAG-NEXT: v_mov_b32_e32 v2, s2808; VI-SDAG-NEXT: v_mov_b32_e32 v1, s1809; VI-SDAG-NEXT: v_mov_b32_e32 v3, s3810; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]811; VI-SDAG-NEXT: s_endpgm812;813; VI-GISEL-LABEL: v_fcmp_f32_ugt:814; VI-GISEL: ; %bb.0:815; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c816; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24817; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x42c80000818; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)819; VI-GISEL-NEXT: v_cmp_nle_f32_e64 s[2:3], s2, v0820; VI-GISEL-NEXT: v_mov_b32_e32 v0, s2821; VI-GISEL-NEXT: v_mov_b32_e32 v3, s1822; VI-GISEL-NEXT: v_mov_b32_e32 v1, s3823; VI-GISEL-NEXT: v_mov_b32_e32 v2, s0824; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]825; VI-GISEL-NEXT: s_endpgm826 %result = call i64 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 10)827 store i64 %result, ptr addrspace(1) %out828 ret void829}830 831define amdgpu_kernel void @v_fcmp_f32_uge(ptr addrspace(1) %out, float %src) {832; GFX11-LABEL: v_fcmp_f32_uge:833; GFX11: ; %bb.0:834; GFX11-NEXT: s_clause 0x1835; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c836; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x24837; GFX11-NEXT: v_mov_b32_e32 v2, 0838; GFX11-NEXT: s_waitcnt lgkmcnt(0)839; GFX11-NEXT: v_cmp_ngt_f32_e64 s[2:3], 0x42c80000, s2840; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)841; GFX11-NEXT: v_mov_b32_e32 v0, s2842; GFX11-NEXT: v_mov_b32_e32 v1, s3843; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]844; GFX11-NEXT: s_endpgm845;846; GFX9-LABEL: v_fcmp_f32_uge:847; GFX9: ; %bb.0:848; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c849; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24850; GFX9-NEXT: v_mov_b32_e32 v0, 0x42c80000851; GFX9-NEXT: v_mov_b32_e32 v2, 0852; GFX9-NEXT: s_waitcnt lgkmcnt(0)853; GFX9-NEXT: v_cmp_nlt_f32_e64 s[2:3], s2, v0854; GFX9-NEXT: v_mov_b32_e32 v0, s2855; GFX9-NEXT: v_mov_b32_e32 v1, s3856; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]857; GFX9-NEXT: s_endpgm858;859; VI-SDAG-LABEL: v_fcmp_f32_uge:860; VI-SDAG: ; %bb.0:861; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c862; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24863; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x42c80000864; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)865; VI-SDAG-NEXT: v_cmp_nlt_f32_e64 s[2:3], s2, v0866; VI-SDAG-NEXT: v_mov_b32_e32 v0, s0867; VI-SDAG-NEXT: v_mov_b32_e32 v2, s2868; VI-SDAG-NEXT: v_mov_b32_e32 v1, s1869; VI-SDAG-NEXT: v_mov_b32_e32 v3, s3870; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]871; VI-SDAG-NEXT: s_endpgm872;873; VI-GISEL-LABEL: v_fcmp_f32_uge:874; VI-GISEL: ; %bb.0:875; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c876; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24877; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x42c80000878; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)879; VI-GISEL-NEXT: v_cmp_nlt_f32_e64 s[2:3], s2, v0880; VI-GISEL-NEXT: v_mov_b32_e32 v0, s2881; VI-GISEL-NEXT: v_mov_b32_e32 v3, s1882; VI-GISEL-NEXT: v_mov_b32_e32 v1, s3883; VI-GISEL-NEXT: v_mov_b32_e32 v2, s0884; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]885; VI-GISEL-NEXT: s_endpgm886 %result = call i64 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 11)887 store i64 %result, ptr addrspace(1) %out888 ret void889}890 891define amdgpu_kernel void @v_fcmp_f32_ult(ptr addrspace(1) %out, float %src) {892; GFX11-LABEL: v_fcmp_f32_ult:893; GFX11: ; %bb.0:894; GFX11-NEXT: s_clause 0x1895; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c896; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x24897; GFX11-NEXT: v_mov_b32_e32 v2, 0898; GFX11-NEXT: s_waitcnt lgkmcnt(0)899; GFX11-NEXT: v_cmp_nle_f32_e64 s[2:3], 0x42c80000, s2900; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)901; GFX11-NEXT: v_mov_b32_e32 v0, s2902; GFX11-NEXT: v_mov_b32_e32 v1, s3903; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]904; GFX11-NEXT: s_endpgm905;906; GFX9-LABEL: v_fcmp_f32_ult:907; GFX9: ; %bb.0:908; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c909; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24910; GFX9-NEXT: v_mov_b32_e32 v0, 0x42c80000911; GFX9-NEXT: v_mov_b32_e32 v2, 0912; GFX9-NEXT: s_waitcnt lgkmcnt(0)913; GFX9-NEXT: v_cmp_nge_f32_e64 s[2:3], s2, v0914; GFX9-NEXT: v_mov_b32_e32 v0, s2915; GFX9-NEXT: v_mov_b32_e32 v1, s3916; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]917; GFX9-NEXT: s_endpgm918;919; VI-SDAG-LABEL: v_fcmp_f32_ult:920; VI-SDAG: ; %bb.0:921; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c922; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24923; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x42c80000924; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)925; VI-SDAG-NEXT: v_cmp_nge_f32_e64 s[2:3], s2, v0926; VI-SDAG-NEXT: v_mov_b32_e32 v0, s0927; VI-SDAG-NEXT: v_mov_b32_e32 v2, s2928; VI-SDAG-NEXT: v_mov_b32_e32 v1, s1929; VI-SDAG-NEXT: v_mov_b32_e32 v3, s3930; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]931; VI-SDAG-NEXT: s_endpgm932;933; VI-GISEL-LABEL: v_fcmp_f32_ult:934; VI-GISEL: ; %bb.0:935; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c936; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24937; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x42c80000938; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)939; VI-GISEL-NEXT: v_cmp_nge_f32_e64 s[2:3], s2, v0940; VI-GISEL-NEXT: v_mov_b32_e32 v0, s2941; VI-GISEL-NEXT: v_mov_b32_e32 v3, s1942; VI-GISEL-NEXT: v_mov_b32_e32 v1, s3943; VI-GISEL-NEXT: v_mov_b32_e32 v2, s0944; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]945; VI-GISEL-NEXT: s_endpgm946 %result = call i64 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 12)947 store i64 %result, ptr addrspace(1) %out948 ret void949}950 951define amdgpu_kernel void @v_fcmp_f32_ule(ptr addrspace(1) %out, float %src) {952; GFX11-LABEL: v_fcmp_f32_ule:953; GFX11: ; %bb.0:954; GFX11-NEXT: s_clause 0x1955; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c956; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x24957; GFX11-NEXT: v_mov_b32_e32 v2, 0958; GFX11-NEXT: s_waitcnt lgkmcnt(0)959; GFX11-NEXT: v_cmp_nlt_f32_e64 s[2:3], 0x42c80000, s2960; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)961; GFX11-NEXT: v_mov_b32_e32 v0, s2962; GFX11-NEXT: v_mov_b32_e32 v1, s3963; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]964; GFX11-NEXT: s_endpgm965;966; GFX9-LABEL: v_fcmp_f32_ule:967; GFX9: ; %bb.0:968; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c969; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24970; GFX9-NEXT: v_mov_b32_e32 v0, 0x42c80000971; GFX9-NEXT: v_mov_b32_e32 v2, 0972; GFX9-NEXT: s_waitcnt lgkmcnt(0)973; GFX9-NEXT: v_cmp_ngt_f32_e64 s[2:3], s2, v0974; GFX9-NEXT: v_mov_b32_e32 v0, s2975; GFX9-NEXT: v_mov_b32_e32 v1, s3976; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]977; GFX9-NEXT: s_endpgm978;979; VI-SDAG-LABEL: v_fcmp_f32_ule:980; VI-SDAG: ; %bb.0:981; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c982; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24983; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x42c80000984; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)985; VI-SDAG-NEXT: v_cmp_ngt_f32_e64 s[2:3], s2, v0986; VI-SDAG-NEXT: v_mov_b32_e32 v0, s0987; VI-SDAG-NEXT: v_mov_b32_e32 v2, s2988; VI-SDAG-NEXT: v_mov_b32_e32 v1, s1989; VI-SDAG-NEXT: v_mov_b32_e32 v3, s3990; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]991; VI-SDAG-NEXT: s_endpgm992;993; VI-GISEL-LABEL: v_fcmp_f32_ule:994; VI-GISEL: ; %bb.0:995; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c996; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24997; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x42c80000998; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)999; VI-GISEL-NEXT: v_cmp_ngt_f32_e64 s[2:3], s2, v01000; VI-GISEL-NEXT: v_mov_b32_e32 v0, s21001; VI-GISEL-NEXT: v_mov_b32_e32 v3, s11002; VI-GISEL-NEXT: v_mov_b32_e32 v1, s31003; VI-GISEL-NEXT: v_mov_b32_e32 v2, s01004; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]1005; VI-GISEL-NEXT: s_endpgm1006 %result = call i64 @llvm.amdgcn.fcmp.f32(float %src, float 100.00, i32 13)1007 store i64 %result, ptr addrspace(1) %out1008 ret void1009}1010 1011define amdgpu_kernel void @v_fcmp_f64_oeq(ptr addrspace(1) %out, double %src) {1012; GFX11-LABEL: v_fcmp_f64_oeq:1013; GFX11: ; %bb.0:1014; GFX11-NEXT: s_load_b128 s[0:3], s[4:5], 0x241015; GFX11-NEXT: v_mov_b32_e32 v2, 01016; GFX11-NEXT: s_waitcnt lgkmcnt(0)1017; GFX11-NEXT: v_cmp_eq_f64_e64 s[2:3], 0x40590000, s[2:3]1018; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)1019; GFX11-NEXT: v_mov_b32_e32 v0, s21020; GFX11-NEXT: v_mov_b32_e32 v1, s31021; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]1022; GFX11-NEXT: s_endpgm1023;1024; GFX9-LABEL: v_fcmp_f64_oeq:1025; GFX9: ; %bb.0:1026; GFX9-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241027; GFX9-NEXT: v_mov_b32_e32 v0, 01028; GFX9-NEXT: v_mov_b32_e32 v1, 0x405900001029; GFX9-NEXT: v_mov_b32_e32 v2, 01030; GFX9-NEXT: s_waitcnt lgkmcnt(0)1031; GFX9-NEXT: v_cmp_eq_f64_e64 s[2:3], s[2:3], v[0:1]1032; GFX9-NEXT: v_mov_b32_e32 v0, s21033; GFX9-NEXT: v_mov_b32_e32 v1, s31034; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]1035; GFX9-NEXT: s_endpgm1036;1037; VI-SDAG-LABEL: v_fcmp_f64_oeq:1038; VI-SDAG: ; %bb.0:1039; VI-SDAG-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241040; VI-SDAG-NEXT: v_mov_b32_e32 v0, 01041; VI-SDAG-NEXT: v_mov_b32_e32 v1, 0x405900001042; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)1043; VI-SDAG-NEXT: v_cmp_eq_f64_e64 s[2:3], s[2:3], v[0:1]1044; VI-SDAG-NEXT: v_mov_b32_e32 v0, s01045; VI-SDAG-NEXT: v_mov_b32_e32 v1, s11046; VI-SDAG-NEXT: v_mov_b32_e32 v2, s21047; VI-SDAG-NEXT: v_mov_b32_e32 v3, s31048; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]1049; VI-SDAG-NEXT: s_endpgm1050;1051; VI-GISEL-LABEL: v_fcmp_f64_oeq:1052; VI-GISEL: ; %bb.0:1053; VI-GISEL-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241054; VI-GISEL-NEXT: v_mov_b32_e32 v0, 01055; VI-GISEL-NEXT: v_mov_b32_e32 v1, 0x405900001056; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)1057; VI-GISEL-NEXT: v_cmp_eq_f64_e64 s[2:3], s[2:3], v[0:1]1058; VI-GISEL-NEXT: v_mov_b32_e32 v3, s11059; VI-GISEL-NEXT: v_mov_b32_e32 v2, s01060; VI-GISEL-NEXT: v_mov_b32_e32 v0, s21061; VI-GISEL-NEXT: v_mov_b32_e32 v1, s31062; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]1063; VI-GISEL-NEXT: s_endpgm1064 %result = call i64 @llvm.amdgcn.fcmp.f64(double %src, double 100.00, i32 1)1065 store i64 %result, ptr addrspace(1) %out1066 ret void1067}1068 1069define amdgpu_kernel void @v_fcmp_f64_one(ptr addrspace(1) %out, double %src) {1070; GFX11-LABEL: v_fcmp_f64_one:1071; GFX11: ; %bb.0:1072; GFX11-NEXT: s_load_b128 s[0:3], s[4:5], 0x241073; GFX11-NEXT: v_mov_b32_e32 v2, 01074; GFX11-NEXT: s_waitcnt lgkmcnt(0)1075; GFX11-NEXT: v_cmp_neq_f64_e64 s[2:3], 0x40590000, s[2:3]1076; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)1077; GFX11-NEXT: v_mov_b32_e32 v0, s21078; GFX11-NEXT: v_mov_b32_e32 v1, s31079; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]1080; GFX11-NEXT: s_endpgm1081;1082; GFX9-LABEL: v_fcmp_f64_one:1083; GFX9: ; %bb.0:1084; GFX9-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241085; GFX9-NEXT: v_mov_b32_e32 v0, 01086; GFX9-NEXT: v_mov_b32_e32 v1, 0x405900001087; GFX9-NEXT: v_mov_b32_e32 v2, 01088; GFX9-NEXT: s_waitcnt lgkmcnt(0)1089; GFX9-NEXT: v_cmp_neq_f64_e64 s[2:3], s[2:3], v[0:1]1090; GFX9-NEXT: v_mov_b32_e32 v0, s21091; GFX9-NEXT: v_mov_b32_e32 v1, s31092; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]1093; GFX9-NEXT: s_endpgm1094;1095; VI-SDAG-LABEL: v_fcmp_f64_one:1096; VI-SDAG: ; %bb.0:1097; VI-SDAG-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241098; VI-SDAG-NEXT: v_mov_b32_e32 v0, 01099; VI-SDAG-NEXT: v_mov_b32_e32 v1, 0x405900001100; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)1101; VI-SDAG-NEXT: v_cmp_neq_f64_e64 s[2:3], s[2:3], v[0:1]1102; VI-SDAG-NEXT: v_mov_b32_e32 v0, s01103; VI-SDAG-NEXT: v_mov_b32_e32 v1, s11104; VI-SDAG-NEXT: v_mov_b32_e32 v2, s21105; VI-SDAG-NEXT: v_mov_b32_e32 v3, s31106; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]1107; VI-SDAG-NEXT: s_endpgm1108;1109; VI-GISEL-LABEL: v_fcmp_f64_one:1110; VI-GISEL: ; %bb.0:1111; VI-GISEL-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241112; VI-GISEL-NEXT: v_mov_b32_e32 v0, 01113; VI-GISEL-NEXT: v_mov_b32_e32 v1, 0x405900001114; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)1115; VI-GISEL-NEXT: v_cmp_neq_f64_e64 s[2:3], s[2:3], v[0:1]1116; VI-GISEL-NEXT: v_mov_b32_e32 v3, s11117; VI-GISEL-NEXT: v_mov_b32_e32 v2, s01118; VI-GISEL-NEXT: v_mov_b32_e32 v0, s21119; VI-GISEL-NEXT: v_mov_b32_e32 v1, s31120; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]1121; VI-GISEL-NEXT: s_endpgm1122 %result = call i64 @llvm.amdgcn.fcmp.f64(double %src, double 100.00, i32 6)1123 store i64 %result, ptr addrspace(1) %out1124 ret void1125}1126 1127define amdgpu_kernel void @v_fcmp_f64_ogt(ptr addrspace(1) %out, double %src) {1128; GFX11-LABEL: v_fcmp_f64_ogt:1129; GFX11: ; %bb.0:1130; GFX11-NEXT: s_load_b128 s[0:3], s[4:5], 0x241131; GFX11-NEXT: v_mov_b32_e32 v2, 01132; GFX11-NEXT: s_waitcnt lgkmcnt(0)1133; GFX11-NEXT: v_cmp_lt_f64_e64 s[2:3], 0x40590000, s[2:3]1134; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)1135; GFX11-NEXT: v_mov_b32_e32 v0, s21136; GFX11-NEXT: v_mov_b32_e32 v1, s31137; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]1138; GFX11-NEXT: s_endpgm1139;1140; GFX9-LABEL: v_fcmp_f64_ogt:1141; GFX9: ; %bb.0:1142; GFX9-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241143; GFX9-NEXT: v_mov_b32_e32 v0, 01144; GFX9-NEXT: v_mov_b32_e32 v1, 0x405900001145; GFX9-NEXT: v_mov_b32_e32 v2, 01146; GFX9-NEXT: s_waitcnt lgkmcnt(0)1147; GFX9-NEXT: v_cmp_gt_f64_e64 s[2:3], s[2:3], v[0:1]1148; GFX9-NEXT: v_mov_b32_e32 v0, s21149; GFX9-NEXT: v_mov_b32_e32 v1, s31150; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]1151; GFX9-NEXT: s_endpgm1152;1153; VI-SDAG-LABEL: v_fcmp_f64_ogt:1154; VI-SDAG: ; %bb.0:1155; VI-SDAG-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241156; VI-SDAG-NEXT: v_mov_b32_e32 v0, 01157; VI-SDAG-NEXT: v_mov_b32_e32 v1, 0x405900001158; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)1159; VI-SDAG-NEXT: v_cmp_gt_f64_e64 s[2:3], s[2:3], v[0:1]1160; VI-SDAG-NEXT: v_mov_b32_e32 v0, s01161; VI-SDAG-NEXT: v_mov_b32_e32 v1, s11162; VI-SDAG-NEXT: v_mov_b32_e32 v2, s21163; VI-SDAG-NEXT: v_mov_b32_e32 v3, s31164; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]1165; VI-SDAG-NEXT: s_endpgm1166;1167; VI-GISEL-LABEL: v_fcmp_f64_ogt:1168; VI-GISEL: ; %bb.0:1169; VI-GISEL-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241170; VI-GISEL-NEXT: v_mov_b32_e32 v0, 01171; VI-GISEL-NEXT: v_mov_b32_e32 v1, 0x405900001172; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)1173; VI-GISEL-NEXT: v_cmp_gt_f64_e64 s[2:3], s[2:3], v[0:1]1174; VI-GISEL-NEXT: v_mov_b32_e32 v3, s11175; VI-GISEL-NEXT: v_mov_b32_e32 v2, s01176; VI-GISEL-NEXT: v_mov_b32_e32 v0, s21177; VI-GISEL-NEXT: v_mov_b32_e32 v1, s31178; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]1179; VI-GISEL-NEXT: s_endpgm1180 %result = call i64 @llvm.amdgcn.fcmp.f64(double %src, double 100.00, i32 2)1181 store i64 %result, ptr addrspace(1) %out1182 ret void1183}1184 1185define amdgpu_kernel void @v_fcmp_f64_oge(ptr addrspace(1) %out, double %src) {1186; GFX11-LABEL: v_fcmp_f64_oge:1187; GFX11: ; %bb.0:1188; GFX11-NEXT: s_load_b128 s[0:3], s[4:5], 0x241189; GFX11-NEXT: v_mov_b32_e32 v2, 01190; GFX11-NEXT: s_waitcnt lgkmcnt(0)1191; GFX11-NEXT: v_cmp_le_f64_e64 s[2:3], 0x40590000, s[2:3]1192; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)1193; GFX11-NEXT: v_mov_b32_e32 v0, s21194; GFX11-NEXT: v_mov_b32_e32 v1, s31195; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]1196; GFX11-NEXT: s_endpgm1197;1198; GFX9-LABEL: v_fcmp_f64_oge:1199; GFX9: ; %bb.0:1200; GFX9-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241201; GFX9-NEXT: v_mov_b32_e32 v0, 01202; GFX9-NEXT: v_mov_b32_e32 v1, 0x405900001203; GFX9-NEXT: v_mov_b32_e32 v2, 01204; GFX9-NEXT: s_waitcnt lgkmcnt(0)1205; GFX9-NEXT: v_cmp_ge_f64_e64 s[2:3], s[2:3], v[0:1]1206; GFX9-NEXT: v_mov_b32_e32 v0, s21207; GFX9-NEXT: v_mov_b32_e32 v1, s31208; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]1209; GFX9-NEXT: s_endpgm1210;1211; VI-SDAG-LABEL: v_fcmp_f64_oge:1212; VI-SDAG: ; %bb.0:1213; VI-SDAG-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241214; VI-SDAG-NEXT: v_mov_b32_e32 v0, 01215; VI-SDAG-NEXT: v_mov_b32_e32 v1, 0x405900001216; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)1217; VI-SDAG-NEXT: v_cmp_ge_f64_e64 s[2:3], s[2:3], v[0:1]1218; VI-SDAG-NEXT: v_mov_b32_e32 v0, s01219; VI-SDAG-NEXT: v_mov_b32_e32 v1, s11220; VI-SDAG-NEXT: v_mov_b32_e32 v2, s21221; VI-SDAG-NEXT: v_mov_b32_e32 v3, s31222; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]1223; VI-SDAG-NEXT: s_endpgm1224;1225; VI-GISEL-LABEL: v_fcmp_f64_oge:1226; VI-GISEL: ; %bb.0:1227; VI-GISEL-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241228; VI-GISEL-NEXT: v_mov_b32_e32 v0, 01229; VI-GISEL-NEXT: v_mov_b32_e32 v1, 0x405900001230; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)1231; VI-GISEL-NEXT: v_cmp_ge_f64_e64 s[2:3], s[2:3], v[0:1]1232; VI-GISEL-NEXT: v_mov_b32_e32 v3, s11233; VI-GISEL-NEXT: v_mov_b32_e32 v2, s01234; VI-GISEL-NEXT: v_mov_b32_e32 v0, s21235; VI-GISEL-NEXT: v_mov_b32_e32 v1, s31236; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]1237; VI-GISEL-NEXT: s_endpgm1238 %result = call i64 @llvm.amdgcn.fcmp.f64(double %src, double 100.00, i32 3)1239 store i64 %result, ptr addrspace(1) %out1240 ret void1241}1242 1243define amdgpu_kernel void @v_fcmp_f64_olt(ptr addrspace(1) %out, double %src) {1244; GFX11-LABEL: v_fcmp_f64_olt:1245; GFX11: ; %bb.0:1246; GFX11-NEXT: s_load_b128 s[0:3], s[4:5], 0x241247; GFX11-NEXT: v_mov_b32_e32 v2, 01248; GFX11-NEXT: s_waitcnt lgkmcnt(0)1249; GFX11-NEXT: v_cmp_gt_f64_e64 s[2:3], 0x40590000, s[2:3]1250; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)1251; GFX11-NEXT: v_mov_b32_e32 v0, s21252; GFX11-NEXT: v_mov_b32_e32 v1, s31253; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]1254; GFX11-NEXT: s_endpgm1255;1256; GFX9-LABEL: v_fcmp_f64_olt:1257; GFX9: ; %bb.0:1258; GFX9-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241259; GFX9-NEXT: v_mov_b32_e32 v0, 01260; GFX9-NEXT: v_mov_b32_e32 v1, 0x405900001261; GFX9-NEXT: v_mov_b32_e32 v2, 01262; GFX9-NEXT: s_waitcnt lgkmcnt(0)1263; GFX9-NEXT: v_cmp_lt_f64_e64 s[2:3], s[2:3], v[0:1]1264; GFX9-NEXT: v_mov_b32_e32 v0, s21265; GFX9-NEXT: v_mov_b32_e32 v1, s31266; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]1267; GFX9-NEXT: s_endpgm1268;1269; VI-SDAG-LABEL: v_fcmp_f64_olt:1270; VI-SDAG: ; %bb.0:1271; VI-SDAG-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241272; VI-SDAG-NEXT: v_mov_b32_e32 v0, 01273; VI-SDAG-NEXT: v_mov_b32_e32 v1, 0x405900001274; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)1275; VI-SDAG-NEXT: v_cmp_lt_f64_e64 s[2:3], s[2:3], v[0:1]1276; VI-SDAG-NEXT: v_mov_b32_e32 v0, s01277; VI-SDAG-NEXT: v_mov_b32_e32 v1, s11278; VI-SDAG-NEXT: v_mov_b32_e32 v2, s21279; VI-SDAG-NEXT: v_mov_b32_e32 v3, s31280; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]1281; VI-SDAG-NEXT: s_endpgm1282;1283; VI-GISEL-LABEL: v_fcmp_f64_olt:1284; VI-GISEL: ; %bb.0:1285; VI-GISEL-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241286; VI-GISEL-NEXT: v_mov_b32_e32 v0, 01287; VI-GISEL-NEXT: v_mov_b32_e32 v1, 0x405900001288; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)1289; VI-GISEL-NEXT: v_cmp_lt_f64_e64 s[2:3], s[2:3], v[0:1]1290; VI-GISEL-NEXT: v_mov_b32_e32 v3, s11291; VI-GISEL-NEXT: v_mov_b32_e32 v2, s01292; VI-GISEL-NEXT: v_mov_b32_e32 v0, s21293; VI-GISEL-NEXT: v_mov_b32_e32 v1, s31294; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]1295; VI-GISEL-NEXT: s_endpgm1296 %result = call i64 @llvm.amdgcn.fcmp.f64(double %src, double 100.00, i32 4)1297 store i64 %result, ptr addrspace(1) %out1298 ret void1299}1300 1301define amdgpu_kernel void @v_fcmp_f64_ole(ptr addrspace(1) %out, double %src) {1302; GFX11-LABEL: v_fcmp_f64_ole:1303; GFX11: ; %bb.0:1304; GFX11-NEXT: s_load_b128 s[0:3], s[4:5], 0x241305; GFX11-NEXT: v_mov_b32_e32 v2, 01306; GFX11-NEXT: s_waitcnt lgkmcnt(0)1307; GFX11-NEXT: v_cmp_ge_f64_e64 s[2:3], 0x40590000, s[2:3]1308; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)1309; GFX11-NEXT: v_mov_b32_e32 v0, s21310; GFX11-NEXT: v_mov_b32_e32 v1, s31311; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]1312; GFX11-NEXT: s_endpgm1313;1314; GFX9-LABEL: v_fcmp_f64_ole:1315; GFX9: ; %bb.0:1316; GFX9-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241317; GFX9-NEXT: v_mov_b32_e32 v0, 01318; GFX9-NEXT: v_mov_b32_e32 v1, 0x405900001319; GFX9-NEXT: v_mov_b32_e32 v2, 01320; GFX9-NEXT: s_waitcnt lgkmcnt(0)1321; GFX9-NEXT: v_cmp_le_f64_e64 s[2:3], s[2:3], v[0:1]1322; GFX9-NEXT: v_mov_b32_e32 v0, s21323; GFX9-NEXT: v_mov_b32_e32 v1, s31324; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]1325; GFX9-NEXT: s_endpgm1326;1327; VI-SDAG-LABEL: v_fcmp_f64_ole:1328; VI-SDAG: ; %bb.0:1329; VI-SDAG-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241330; VI-SDAG-NEXT: v_mov_b32_e32 v0, 01331; VI-SDAG-NEXT: v_mov_b32_e32 v1, 0x405900001332; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)1333; VI-SDAG-NEXT: v_cmp_le_f64_e64 s[2:3], s[2:3], v[0:1]1334; VI-SDAG-NEXT: v_mov_b32_e32 v0, s01335; VI-SDAG-NEXT: v_mov_b32_e32 v1, s11336; VI-SDAG-NEXT: v_mov_b32_e32 v2, s21337; VI-SDAG-NEXT: v_mov_b32_e32 v3, s31338; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]1339; VI-SDAG-NEXT: s_endpgm1340;1341; VI-GISEL-LABEL: v_fcmp_f64_ole:1342; VI-GISEL: ; %bb.0:1343; VI-GISEL-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241344; VI-GISEL-NEXT: v_mov_b32_e32 v0, 01345; VI-GISEL-NEXT: v_mov_b32_e32 v1, 0x405900001346; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)1347; VI-GISEL-NEXT: v_cmp_le_f64_e64 s[2:3], s[2:3], v[0:1]1348; VI-GISEL-NEXT: v_mov_b32_e32 v3, s11349; VI-GISEL-NEXT: v_mov_b32_e32 v2, s01350; VI-GISEL-NEXT: v_mov_b32_e32 v0, s21351; VI-GISEL-NEXT: v_mov_b32_e32 v1, s31352; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]1353; VI-GISEL-NEXT: s_endpgm1354 %result = call i64 @llvm.amdgcn.fcmp.f64(double %src, double 100.00, i32 5)1355 store i64 %result, ptr addrspace(1) %out1356 ret void1357}1358 1359define amdgpu_kernel void @v_fcmp_f64_ueq(ptr addrspace(1) %out, double %src) {1360; GFX11-LABEL: v_fcmp_f64_ueq:1361; GFX11: ; %bb.0:1362; GFX11-NEXT: s_load_b128 s[0:3], s[4:5], 0x241363; GFX11-NEXT: v_mov_b32_e32 v2, 01364; GFX11-NEXT: s_waitcnt lgkmcnt(0)1365; GFX11-NEXT: v_cmp_nlg_f64_e64 s[2:3], 0x40590000, s[2:3]1366; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)1367; GFX11-NEXT: v_mov_b32_e32 v0, s21368; GFX11-NEXT: v_mov_b32_e32 v1, s31369; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]1370; GFX11-NEXT: s_endpgm1371;1372; GFX9-LABEL: v_fcmp_f64_ueq:1373; GFX9: ; %bb.0:1374; GFX9-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241375; GFX9-NEXT: v_mov_b32_e32 v0, 01376; GFX9-NEXT: v_mov_b32_e32 v1, 0x405900001377; GFX9-NEXT: v_mov_b32_e32 v2, 01378; GFX9-NEXT: s_waitcnt lgkmcnt(0)1379; GFX9-NEXT: v_cmp_nlg_f64_e64 s[2:3], s[2:3], v[0:1]1380; GFX9-NEXT: v_mov_b32_e32 v0, s21381; GFX9-NEXT: v_mov_b32_e32 v1, s31382; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]1383; GFX9-NEXT: s_endpgm1384;1385; VI-SDAG-LABEL: v_fcmp_f64_ueq:1386; VI-SDAG: ; %bb.0:1387; VI-SDAG-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241388; VI-SDAG-NEXT: v_mov_b32_e32 v0, 01389; VI-SDAG-NEXT: v_mov_b32_e32 v1, 0x405900001390; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)1391; VI-SDAG-NEXT: v_cmp_nlg_f64_e64 s[2:3], s[2:3], v[0:1]1392; VI-SDAG-NEXT: v_mov_b32_e32 v0, s01393; VI-SDAG-NEXT: v_mov_b32_e32 v1, s11394; VI-SDAG-NEXT: v_mov_b32_e32 v2, s21395; VI-SDAG-NEXT: v_mov_b32_e32 v3, s31396; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]1397; VI-SDAG-NEXT: s_endpgm1398;1399; VI-GISEL-LABEL: v_fcmp_f64_ueq:1400; VI-GISEL: ; %bb.0:1401; VI-GISEL-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241402; VI-GISEL-NEXT: v_mov_b32_e32 v0, 01403; VI-GISEL-NEXT: v_mov_b32_e32 v1, 0x405900001404; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)1405; VI-GISEL-NEXT: v_cmp_nlg_f64_e64 s[2:3], s[2:3], v[0:1]1406; VI-GISEL-NEXT: v_mov_b32_e32 v3, s11407; VI-GISEL-NEXT: v_mov_b32_e32 v2, s01408; VI-GISEL-NEXT: v_mov_b32_e32 v0, s21409; VI-GISEL-NEXT: v_mov_b32_e32 v1, s31410; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]1411; VI-GISEL-NEXT: s_endpgm1412 %result = call i64 @llvm.amdgcn.fcmp.f64(double %src, double 100.00, i32 9)1413 store i64 %result, ptr addrspace(1) %out1414 ret void1415}1416 1417define amdgpu_kernel void @v_fcmp_f64_o(ptr addrspace(1) %out, double %src) {1418; GFX11-LABEL: v_fcmp_f64_o:1419; GFX11: ; %bb.0:1420; GFX11-NEXT: s_load_b128 s[0:3], s[4:5], 0x241421; GFX11-NEXT: v_mov_b32_e32 v2, 01422; GFX11-NEXT: s_waitcnt lgkmcnt(0)1423; GFX11-NEXT: v_cmp_o_f64_e64 s[2:3], 0x40590000, s[2:3]1424; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)1425; GFX11-NEXT: v_mov_b32_e32 v0, s21426; GFX11-NEXT: v_mov_b32_e32 v1, s31427; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]1428; GFX11-NEXT: s_endpgm1429;1430; GFX9-LABEL: v_fcmp_f64_o:1431; GFX9: ; %bb.0:1432; GFX9-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241433; GFX9-NEXT: v_mov_b32_e32 v0, 01434; GFX9-NEXT: v_mov_b32_e32 v1, 0x405900001435; GFX9-NEXT: v_mov_b32_e32 v2, 01436; GFX9-NEXT: s_waitcnt lgkmcnt(0)1437; GFX9-NEXT: v_cmp_o_f64_e64 s[2:3], s[2:3], v[0:1]1438; GFX9-NEXT: v_mov_b32_e32 v0, s21439; GFX9-NEXT: v_mov_b32_e32 v1, s31440; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]1441; GFX9-NEXT: s_endpgm1442;1443; VI-SDAG-LABEL: v_fcmp_f64_o:1444; VI-SDAG: ; %bb.0:1445; VI-SDAG-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241446; VI-SDAG-NEXT: v_mov_b32_e32 v0, 01447; VI-SDAG-NEXT: v_mov_b32_e32 v1, 0x405900001448; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)1449; VI-SDAG-NEXT: v_cmp_o_f64_e64 s[2:3], s[2:3], v[0:1]1450; VI-SDAG-NEXT: v_mov_b32_e32 v0, s01451; VI-SDAG-NEXT: v_mov_b32_e32 v1, s11452; VI-SDAG-NEXT: v_mov_b32_e32 v2, s21453; VI-SDAG-NEXT: v_mov_b32_e32 v3, s31454; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]1455; VI-SDAG-NEXT: s_endpgm1456;1457; VI-GISEL-LABEL: v_fcmp_f64_o:1458; VI-GISEL: ; %bb.0:1459; VI-GISEL-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241460; VI-GISEL-NEXT: v_mov_b32_e32 v0, 01461; VI-GISEL-NEXT: v_mov_b32_e32 v1, 0x405900001462; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)1463; VI-GISEL-NEXT: v_cmp_o_f64_e64 s[2:3], s[2:3], v[0:1]1464; VI-GISEL-NEXT: v_mov_b32_e32 v3, s11465; VI-GISEL-NEXT: v_mov_b32_e32 v2, s01466; VI-GISEL-NEXT: v_mov_b32_e32 v0, s21467; VI-GISEL-NEXT: v_mov_b32_e32 v1, s31468; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]1469; VI-GISEL-NEXT: s_endpgm1470 %result = call i64 @llvm.amdgcn.fcmp.f64(double %src, double 100.00, i32 7)1471 store i64 %result, ptr addrspace(1) %out1472 ret void1473}1474 1475define amdgpu_kernel void @v_fcmp_f64_uo(ptr addrspace(1) %out, double %src) {1476; GFX11-LABEL: v_fcmp_f64_uo:1477; GFX11: ; %bb.0:1478; GFX11-NEXT: s_load_b128 s[0:3], s[4:5], 0x241479; GFX11-NEXT: v_mov_b32_e32 v2, 01480; GFX11-NEXT: s_waitcnt lgkmcnt(0)1481; GFX11-NEXT: v_cmp_u_f64_e64 s[2:3], 0x40590000, s[2:3]1482; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)1483; GFX11-NEXT: v_mov_b32_e32 v0, s21484; GFX11-NEXT: v_mov_b32_e32 v1, s31485; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]1486; GFX11-NEXT: s_endpgm1487;1488; GFX9-LABEL: v_fcmp_f64_uo:1489; GFX9: ; %bb.0:1490; GFX9-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241491; GFX9-NEXT: v_mov_b32_e32 v0, 01492; GFX9-NEXT: v_mov_b32_e32 v1, 0x405900001493; GFX9-NEXT: v_mov_b32_e32 v2, 01494; GFX9-NEXT: s_waitcnt lgkmcnt(0)1495; GFX9-NEXT: v_cmp_u_f64_e64 s[2:3], s[2:3], v[0:1]1496; GFX9-NEXT: v_mov_b32_e32 v0, s21497; GFX9-NEXT: v_mov_b32_e32 v1, s31498; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]1499; GFX9-NEXT: s_endpgm1500;1501; VI-SDAG-LABEL: v_fcmp_f64_uo:1502; VI-SDAG: ; %bb.0:1503; VI-SDAG-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241504; VI-SDAG-NEXT: v_mov_b32_e32 v0, 01505; VI-SDAG-NEXT: v_mov_b32_e32 v1, 0x405900001506; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)1507; VI-SDAG-NEXT: v_cmp_u_f64_e64 s[2:3], s[2:3], v[0:1]1508; VI-SDAG-NEXT: v_mov_b32_e32 v0, s01509; VI-SDAG-NEXT: v_mov_b32_e32 v1, s11510; VI-SDAG-NEXT: v_mov_b32_e32 v2, s21511; VI-SDAG-NEXT: v_mov_b32_e32 v3, s31512; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]1513; VI-SDAG-NEXT: s_endpgm1514;1515; VI-GISEL-LABEL: v_fcmp_f64_uo:1516; VI-GISEL: ; %bb.0:1517; VI-GISEL-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241518; VI-GISEL-NEXT: v_mov_b32_e32 v0, 01519; VI-GISEL-NEXT: v_mov_b32_e32 v1, 0x405900001520; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)1521; VI-GISEL-NEXT: v_cmp_u_f64_e64 s[2:3], s[2:3], v[0:1]1522; VI-GISEL-NEXT: v_mov_b32_e32 v3, s11523; VI-GISEL-NEXT: v_mov_b32_e32 v2, s01524; VI-GISEL-NEXT: v_mov_b32_e32 v0, s21525; VI-GISEL-NEXT: v_mov_b32_e32 v1, s31526; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]1527; VI-GISEL-NEXT: s_endpgm1528 %result = call i64 @llvm.amdgcn.fcmp.f64(double %src, double 100.00, i32 8)1529 store i64 %result, ptr addrspace(1) %out1530 ret void1531}1532 1533define amdgpu_kernel void @v_fcmp_f64_une(ptr addrspace(1) %out, double %src) {1534; GFX11-LABEL: v_fcmp_f64_une:1535; GFX11: ; %bb.0:1536; GFX11-NEXT: s_load_b128 s[0:3], s[4:5], 0x241537; GFX11-NEXT: v_mov_b32_e32 v2, 01538; GFX11-NEXT: s_waitcnt lgkmcnt(0)1539; GFX11-NEXT: v_cmp_neq_f64_e64 s[2:3], 0x40590000, s[2:3]1540; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)1541; GFX11-NEXT: v_mov_b32_e32 v0, s21542; GFX11-NEXT: v_mov_b32_e32 v1, s31543; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]1544; GFX11-NEXT: s_endpgm1545;1546; GFX9-LABEL: v_fcmp_f64_une:1547; GFX9: ; %bb.0:1548; GFX9-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241549; GFX9-NEXT: v_mov_b32_e32 v0, 01550; GFX9-NEXT: v_mov_b32_e32 v1, 0x405900001551; GFX9-NEXT: v_mov_b32_e32 v2, 01552; GFX9-NEXT: s_waitcnt lgkmcnt(0)1553; GFX9-NEXT: v_cmp_neq_f64_e64 s[2:3], s[2:3], v[0:1]1554; GFX9-NEXT: v_mov_b32_e32 v0, s21555; GFX9-NEXT: v_mov_b32_e32 v1, s31556; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]1557; GFX9-NEXT: s_endpgm1558;1559; VI-SDAG-LABEL: v_fcmp_f64_une:1560; VI-SDAG: ; %bb.0:1561; VI-SDAG-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241562; VI-SDAG-NEXT: v_mov_b32_e32 v0, 01563; VI-SDAG-NEXT: v_mov_b32_e32 v1, 0x405900001564; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)1565; VI-SDAG-NEXT: v_cmp_neq_f64_e64 s[2:3], s[2:3], v[0:1]1566; VI-SDAG-NEXT: v_mov_b32_e32 v0, s01567; VI-SDAG-NEXT: v_mov_b32_e32 v1, s11568; VI-SDAG-NEXT: v_mov_b32_e32 v2, s21569; VI-SDAG-NEXT: v_mov_b32_e32 v3, s31570; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]1571; VI-SDAG-NEXT: s_endpgm1572;1573; VI-GISEL-LABEL: v_fcmp_f64_une:1574; VI-GISEL: ; %bb.0:1575; VI-GISEL-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241576; VI-GISEL-NEXT: v_mov_b32_e32 v0, 01577; VI-GISEL-NEXT: v_mov_b32_e32 v1, 0x405900001578; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)1579; VI-GISEL-NEXT: v_cmp_neq_f64_e64 s[2:3], s[2:3], v[0:1]1580; VI-GISEL-NEXT: v_mov_b32_e32 v3, s11581; VI-GISEL-NEXT: v_mov_b32_e32 v2, s01582; VI-GISEL-NEXT: v_mov_b32_e32 v0, s21583; VI-GISEL-NEXT: v_mov_b32_e32 v1, s31584; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]1585; VI-GISEL-NEXT: s_endpgm1586 %result = call i64 @llvm.amdgcn.fcmp.f64(double %src, double 100.00, i32 14)1587 store i64 %result, ptr addrspace(1) %out1588 ret void1589}1590 1591define amdgpu_kernel void @v_fcmp_f64_ugt(ptr addrspace(1) %out, double %src) {1592; GFX11-LABEL: v_fcmp_f64_ugt:1593; GFX11: ; %bb.0:1594; GFX11-NEXT: s_load_b128 s[0:3], s[4:5], 0x241595; GFX11-NEXT: v_mov_b32_e32 v2, 01596; GFX11-NEXT: s_waitcnt lgkmcnt(0)1597; GFX11-NEXT: v_cmp_nge_f64_e64 s[2:3], 0x40590000, s[2:3]1598; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)1599; GFX11-NEXT: v_mov_b32_e32 v0, s21600; GFX11-NEXT: v_mov_b32_e32 v1, s31601; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]1602; GFX11-NEXT: s_endpgm1603;1604; GFX9-LABEL: v_fcmp_f64_ugt:1605; GFX9: ; %bb.0:1606; GFX9-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241607; GFX9-NEXT: v_mov_b32_e32 v0, 01608; GFX9-NEXT: v_mov_b32_e32 v1, 0x405900001609; GFX9-NEXT: v_mov_b32_e32 v2, 01610; GFX9-NEXT: s_waitcnt lgkmcnt(0)1611; GFX9-NEXT: v_cmp_nle_f64_e64 s[2:3], s[2:3], v[0:1]1612; GFX9-NEXT: v_mov_b32_e32 v0, s21613; GFX9-NEXT: v_mov_b32_e32 v1, s31614; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]1615; GFX9-NEXT: s_endpgm1616;1617; VI-SDAG-LABEL: v_fcmp_f64_ugt:1618; VI-SDAG: ; %bb.0:1619; VI-SDAG-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241620; VI-SDAG-NEXT: v_mov_b32_e32 v0, 01621; VI-SDAG-NEXT: v_mov_b32_e32 v1, 0x405900001622; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)1623; VI-SDAG-NEXT: v_cmp_nle_f64_e64 s[2:3], s[2:3], v[0:1]1624; VI-SDAG-NEXT: v_mov_b32_e32 v0, s01625; VI-SDAG-NEXT: v_mov_b32_e32 v1, s11626; VI-SDAG-NEXT: v_mov_b32_e32 v2, s21627; VI-SDAG-NEXT: v_mov_b32_e32 v3, s31628; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]1629; VI-SDAG-NEXT: s_endpgm1630;1631; VI-GISEL-LABEL: v_fcmp_f64_ugt:1632; VI-GISEL: ; %bb.0:1633; VI-GISEL-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241634; VI-GISEL-NEXT: v_mov_b32_e32 v0, 01635; VI-GISEL-NEXT: v_mov_b32_e32 v1, 0x405900001636; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)1637; VI-GISEL-NEXT: v_cmp_nle_f64_e64 s[2:3], s[2:3], v[0:1]1638; VI-GISEL-NEXT: v_mov_b32_e32 v3, s11639; VI-GISEL-NEXT: v_mov_b32_e32 v2, s01640; VI-GISEL-NEXT: v_mov_b32_e32 v0, s21641; VI-GISEL-NEXT: v_mov_b32_e32 v1, s31642; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]1643; VI-GISEL-NEXT: s_endpgm1644 %result = call i64 @llvm.amdgcn.fcmp.f64(double %src, double 100.00, i32 10)1645 store i64 %result, ptr addrspace(1) %out1646 ret void1647}1648 1649define amdgpu_kernel void @v_fcmp_f64_uge(ptr addrspace(1) %out, double %src) {1650; GFX11-LABEL: v_fcmp_f64_uge:1651; GFX11: ; %bb.0:1652; GFX11-NEXT: s_load_b128 s[0:3], s[4:5], 0x241653; GFX11-NEXT: v_mov_b32_e32 v2, 01654; GFX11-NEXT: s_waitcnt lgkmcnt(0)1655; GFX11-NEXT: v_cmp_ngt_f64_e64 s[2:3], 0x40590000, s[2:3]1656; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)1657; GFX11-NEXT: v_mov_b32_e32 v0, s21658; GFX11-NEXT: v_mov_b32_e32 v1, s31659; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]1660; GFX11-NEXT: s_endpgm1661;1662; GFX9-LABEL: v_fcmp_f64_uge:1663; GFX9: ; %bb.0:1664; GFX9-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241665; GFX9-NEXT: v_mov_b32_e32 v0, 01666; GFX9-NEXT: v_mov_b32_e32 v1, 0x405900001667; GFX9-NEXT: v_mov_b32_e32 v2, 01668; GFX9-NEXT: s_waitcnt lgkmcnt(0)1669; GFX9-NEXT: v_cmp_nlt_f64_e64 s[2:3], s[2:3], v[0:1]1670; GFX9-NEXT: v_mov_b32_e32 v0, s21671; GFX9-NEXT: v_mov_b32_e32 v1, s31672; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]1673; GFX9-NEXT: s_endpgm1674;1675; VI-SDAG-LABEL: v_fcmp_f64_uge:1676; VI-SDAG: ; %bb.0:1677; VI-SDAG-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241678; VI-SDAG-NEXT: v_mov_b32_e32 v0, 01679; VI-SDAG-NEXT: v_mov_b32_e32 v1, 0x405900001680; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)1681; VI-SDAG-NEXT: v_cmp_nlt_f64_e64 s[2:3], s[2:3], v[0:1]1682; VI-SDAG-NEXT: v_mov_b32_e32 v0, s01683; VI-SDAG-NEXT: v_mov_b32_e32 v1, s11684; VI-SDAG-NEXT: v_mov_b32_e32 v2, s21685; VI-SDAG-NEXT: v_mov_b32_e32 v3, s31686; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]1687; VI-SDAG-NEXT: s_endpgm1688;1689; VI-GISEL-LABEL: v_fcmp_f64_uge:1690; VI-GISEL: ; %bb.0:1691; VI-GISEL-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241692; VI-GISEL-NEXT: v_mov_b32_e32 v0, 01693; VI-GISEL-NEXT: v_mov_b32_e32 v1, 0x405900001694; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)1695; VI-GISEL-NEXT: v_cmp_nlt_f64_e64 s[2:3], s[2:3], v[0:1]1696; VI-GISEL-NEXT: v_mov_b32_e32 v3, s11697; VI-GISEL-NEXT: v_mov_b32_e32 v2, s01698; VI-GISEL-NEXT: v_mov_b32_e32 v0, s21699; VI-GISEL-NEXT: v_mov_b32_e32 v1, s31700; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]1701; VI-GISEL-NEXT: s_endpgm1702 %result = call i64 @llvm.amdgcn.fcmp.f64(double %src, double 100.00, i32 11)1703 store i64 %result, ptr addrspace(1) %out1704 ret void1705}1706 1707define amdgpu_kernel void @v_fcmp_f64_ult(ptr addrspace(1) %out, double %src) {1708; GFX11-LABEL: v_fcmp_f64_ult:1709; GFX11: ; %bb.0:1710; GFX11-NEXT: s_load_b128 s[0:3], s[4:5], 0x241711; GFX11-NEXT: v_mov_b32_e32 v2, 01712; GFX11-NEXT: s_waitcnt lgkmcnt(0)1713; GFX11-NEXT: v_cmp_nle_f64_e64 s[2:3], 0x40590000, s[2:3]1714; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)1715; GFX11-NEXT: v_mov_b32_e32 v0, s21716; GFX11-NEXT: v_mov_b32_e32 v1, s31717; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]1718; GFX11-NEXT: s_endpgm1719;1720; GFX9-LABEL: v_fcmp_f64_ult:1721; GFX9: ; %bb.0:1722; GFX9-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241723; GFX9-NEXT: v_mov_b32_e32 v0, 01724; GFX9-NEXT: v_mov_b32_e32 v1, 0x405900001725; GFX9-NEXT: v_mov_b32_e32 v2, 01726; GFX9-NEXT: s_waitcnt lgkmcnt(0)1727; GFX9-NEXT: v_cmp_nge_f64_e64 s[2:3], s[2:3], v[0:1]1728; GFX9-NEXT: v_mov_b32_e32 v0, s21729; GFX9-NEXT: v_mov_b32_e32 v1, s31730; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]1731; GFX9-NEXT: s_endpgm1732;1733; VI-SDAG-LABEL: v_fcmp_f64_ult:1734; VI-SDAG: ; %bb.0:1735; VI-SDAG-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241736; VI-SDAG-NEXT: v_mov_b32_e32 v0, 01737; VI-SDAG-NEXT: v_mov_b32_e32 v1, 0x405900001738; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)1739; VI-SDAG-NEXT: v_cmp_nge_f64_e64 s[2:3], s[2:3], v[0:1]1740; VI-SDAG-NEXT: v_mov_b32_e32 v0, s01741; VI-SDAG-NEXT: v_mov_b32_e32 v1, s11742; VI-SDAG-NEXT: v_mov_b32_e32 v2, s21743; VI-SDAG-NEXT: v_mov_b32_e32 v3, s31744; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]1745; VI-SDAG-NEXT: s_endpgm1746;1747; VI-GISEL-LABEL: v_fcmp_f64_ult:1748; VI-GISEL: ; %bb.0:1749; VI-GISEL-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241750; VI-GISEL-NEXT: v_mov_b32_e32 v0, 01751; VI-GISEL-NEXT: v_mov_b32_e32 v1, 0x405900001752; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)1753; VI-GISEL-NEXT: v_cmp_nge_f64_e64 s[2:3], s[2:3], v[0:1]1754; VI-GISEL-NEXT: v_mov_b32_e32 v3, s11755; VI-GISEL-NEXT: v_mov_b32_e32 v2, s01756; VI-GISEL-NEXT: v_mov_b32_e32 v0, s21757; VI-GISEL-NEXT: v_mov_b32_e32 v1, s31758; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]1759; VI-GISEL-NEXT: s_endpgm1760 %result = call i64 @llvm.amdgcn.fcmp.f64(double %src, double 100.00, i32 12)1761 store i64 %result, ptr addrspace(1) %out1762 ret void1763}1764 1765define amdgpu_kernel void @v_fcmp_f64_ule(ptr addrspace(1) %out, double %src) {1766; GFX11-LABEL: v_fcmp_f64_ule:1767; GFX11: ; %bb.0:1768; GFX11-NEXT: s_load_b128 s[0:3], s[4:5], 0x241769; GFX11-NEXT: v_mov_b32_e32 v2, 01770; GFX11-NEXT: s_waitcnt lgkmcnt(0)1771; GFX11-NEXT: v_cmp_nlt_f64_e64 s[2:3], 0x40590000, s[2:3]1772; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)1773; GFX11-NEXT: v_mov_b32_e32 v0, s21774; GFX11-NEXT: v_mov_b32_e32 v1, s31775; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]1776; GFX11-NEXT: s_endpgm1777;1778; GFX9-LABEL: v_fcmp_f64_ule:1779; GFX9: ; %bb.0:1780; GFX9-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241781; GFX9-NEXT: v_mov_b32_e32 v0, 01782; GFX9-NEXT: v_mov_b32_e32 v1, 0x405900001783; GFX9-NEXT: v_mov_b32_e32 v2, 01784; GFX9-NEXT: s_waitcnt lgkmcnt(0)1785; GFX9-NEXT: v_cmp_ngt_f64_e64 s[2:3], s[2:3], v[0:1]1786; GFX9-NEXT: v_mov_b32_e32 v0, s21787; GFX9-NEXT: v_mov_b32_e32 v1, s31788; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]1789; GFX9-NEXT: s_endpgm1790;1791; VI-SDAG-LABEL: v_fcmp_f64_ule:1792; VI-SDAG: ; %bb.0:1793; VI-SDAG-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241794; VI-SDAG-NEXT: v_mov_b32_e32 v0, 01795; VI-SDAG-NEXT: v_mov_b32_e32 v1, 0x405900001796; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)1797; VI-SDAG-NEXT: v_cmp_ngt_f64_e64 s[2:3], s[2:3], v[0:1]1798; VI-SDAG-NEXT: v_mov_b32_e32 v0, s01799; VI-SDAG-NEXT: v_mov_b32_e32 v1, s11800; VI-SDAG-NEXT: v_mov_b32_e32 v2, s21801; VI-SDAG-NEXT: v_mov_b32_e32 v3, s31802; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]1803; VI-SDAG-NEXT: s_endpgm1804;1805; VI-GISEL-LABEL: v_fcmp_f64_ule:1806; VI-GISEL: ; %bb.0:1807; VI-GISEL-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x241808; VI-GISEL-NEXT: v_mov_b32_e32 v0, 01809; VI-GISEL-NEXT: v_mov_b32_e32 v1, 0x405900001810; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)1811; VI-GISEL-NEXT: v_cmp_ngt_f64_e64 s[2:3], s[2:3], v[0:1]1812; VI-GISEL-NEXT: v_mov_b32_e32 v3, s11813; VI-GISEL-NEXT: v_mov_b32_e32 v2, s01814; VI-GISEL-NEXT: v_mov_b32_e32 v0, s21815; VI-GISEL-NEXT: v_mov_b32_e32 v1, s31816; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]1817; VI-GISEL-NEXT: s_endpgm1818 %result = call i64 @llvm.amdgcn.fcmp.f64(double %src, double 100.00, i32 13)1819 store i64 %result, ptr addrspace(1) %out1820 ret void1821}1822 1823 1824define amdgpu_kernel void @v_fcmp_f16_oeq_with_fabs(ptr addrspace(1) %out, half %src, half %a) {1825; GFX11-LABEL: v_fcmp_f16_oeq_with_fabs:1826; GFX11: ; %bb.0:1827; GFX11-NEXT: s_clause 0x11828; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c1829; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x241830; GFX11-NEXT: v_mov_b32_e32 v2, 01831; GFX11-NEXT: s_waitcnt lgkmcnt(0)1832; GFX11-NEXT: s_lshr_b32 s3, s2, 161833; GFX11-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)1834; GFX11-NEXT: v_cmp_eq_f16_e64 s[2:3], s2, |s3|1835; GFX11-NEXT: v_mov_b32_e32 v0, s21836; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_2)1837; GFX11-NEXT: v_mov_b32_e32 v1, s31838; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]1839; GFX11-NEXT: s_endpgm1840;1841; GFX9-LABEL: v_fcmp_f16_oeq_with_fabs:1842; GFX9: ; %bb.0:1843; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c1844; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x241845; GFX9-NEXT: v_mov_b32_e32 v2, 01846; GFX9-NEXT: s_waitcnt lgkmcnt(0)1847; GFX9-NEXT: s_lshr_b32 s3, s2, 161848; GFX9-NEXT: v_mov_b32_e32 v0, s31849; GFX9-NEXT: v_cmp_eq_f16_e64 s[2:3], s2, |v0|1850; GFX9-NEXT: v_mov_b32_e32 v0, s21851; GFX9-NEXT: v_mov_b32_e32 v1, s31852; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]1853; GFX9-NEXT: s_endpgm1854;1855; VI-SDAG-LABEL: v_fcmp_f16_oeq_with_fabs:1856; VI-SDAG: ; %bb.0:1857; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c1858; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x241859; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)1860; VI-SDAG-NEXT: s_lshr_b32 s3, s2, 161861; VI-SDAG-NEXT: v_mov_b32_e32 v0, s31862; VI-SDAG-NEXT: v_cmp_eq_f16_e64 s[2:3], s2, |v0|1863; VI-SDAG-NEXT: v_mov_b32_e32 v0, s01864; VI-SDAG-NEXT: v_mov_b32_e32 v2, s21865; VI-SDAG-NEXT: v_mov_b32_e32 v1, s11866; VI-SDAG-NEXT: v_mov_b32_e32 v3, s31867; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]1868; VI-SDAG-NEXT: s_endpgm1869;1870; VI-GISEL-LABEL: v_fcmp_f16_oeq_with_fabs:1871; VI-GISEL: ; %bb.0:1872; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c1873; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x241874; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)1875; VI-GISEL-NEXT: s_lshr_b32 s3, s2, 161876; VI-GISEL-NEXT: v_mov_b32_e32 v0, s31877; VI-GISEL-NEXT: v_cmp_eq_f16_e64 s[2:3], s2, |v0|1878; VI-GISEL-NEXT: v_mov_b32_e32 v0, s21879; VI-GISEL-NEXT: v_mov_b32_e32 v3, s11880; VI-GISEL-NEXT: v_mov_b32_e32 v1, s31881; VI-GISEL-NEXT: v_mov_b32_e32 v2, s01882; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]1883; VI-GISEL-NEXT: s_endpgm1884 %temp = call half @llvm.fabs.f16(half %a)1885 %result = call i64 @llvm.amdgcn.fcmp.f16(half %src, half %temp, i32 1)1886 store i64 %result, ptr addrspace(1) %out1887 ret void1888}1889 1890 1891define amdgpu_kernel void @v_fcmp_f16_oeq_both_operands_with_fabs(ptr addrspace(1) %out, half %src, half %a) {1892; GFX11-LABEL: v_fcmp_f16_oeq_both_operands_with_fabs:1893; GFX11: ; %bb.0:1894; GFX11-NEXT: s_clause 0x11895; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c1896; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x241897; GFX11-NEXT: v_mov_b32_e32 v2, 01898; GFX11-NEXT: s_waitcnt lgkmcnt(0)1899; GFX11-NEXT: s_lshr_b32 s3, s2, 161900; GFX11-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)1901; GFX11-NEXT: v_cmp_eq_f16_e64 s[2:3], |s2|, |s3|1902; GFX11-NEXT: v_mov_b32_e32 v0, s21903; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_2)1904; GFX11-NEXT: v_mov_b32_e32 v1, s31905; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]1906; GFX11-NEXT: s_endpgm1907;1908; GFX9-LABEL: v_fcmp_f16_oeq_both_operands_with_fabs:1909; GFX9: ; %bb.0:1910; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c1911; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x241912; GFX9-NEXT: v_mov_b32_e32 v2, 01913; GFX9-NEXT: s_waitcnt lgkmcnt(0)1914; GFX9-NEXT: s_lshr_b32 s3, s2, 161915; GFX9-NEXT: v_mov_b32_e32 v0, s31916; GFX9-NEXT: v_cmp_eq_f16_e64 s[2:3], |s2|, |v0|1917; GFX9-NEXT: v_mov_b32_e32 v0, s21918; GFX9-NEXT: v_mov_b32_e32 v1, s31919; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]1920; GFX9-NEXT: s_endpgm1921;1922; VI-SDAG-LABEL: v_fcmp_f16_oeq_both_operands_with_fabs:1923; VI-SDAG: ; %bb.0:1924; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c1925; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x241926; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)1927; VI-SDAG-NEXT: s_lshr_b32 s3, s2, 161928; VI-SDAG-NEXT: v_mov_b32_e32 v0, s31929; VI-SDAG-NEXT: v_cmp_eq_f16_e64 s[2:3], |s2|, |v0|1930; VI-SDAG-NEXT: v_mov_b32_e32 v0, s01931; VI-SDAG-NEXT: v_mov_b32_e32 v2, s21932; VI-SDAG-NEXT: v_mov_b32_e32 v1, s11933; VI-SDAG-NEXT: v_mov_b32_e32 v3, s31934; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]1935; VI-SDAG-NEXT: s_endpgm1936;1937; VI-GISEL-LABEL: v_fcmp_f16_oeq_both_operands_with_fabs:1938; VI-GISEL: ; %bb.0:1939; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c1940; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x241941; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)1942; VI-GISEL-NEXT: s_lshr_b32 s3, s2, 161943; VI-GISEL-NEXT: v_mov_b32_e32 v0, s31944; VI-GISEL-NEXT: v_cmp_eq_f16_e64 s[2:3], |s2|, |v0|1945; VI-GISEL-NEXT: v_mov_b32_e32 v0, s21946; VI-GISEL-NEXT: v_mov_b32_e32 v3, s11947; VI-GISEL-NEXT: v_mov_b32_e32 v1, s31948; VI-GISEL-NEXT: v_mov_b32_e32 v2, s01949; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]1950; VI-GISEL-NEXT: s_endpgm1951 %temp = call half @llvm.fabs.f16(half %a)1952 %src_input = call half @llvm.fabs.f16(half %src)1953 %result = call i64 @llvm.amdgcn.fcmp.f16(half %src_input, half %temp, i32 1)1954 store i64 %result, ptr addrspace(1) %out1955 ret void1956}1957 1958define amdgpu_kernel void @v_fcmp_f16(ptr addrspace(1) %out, half %src) {1959; GFX11-SDAG-LABEL: v_fcmp_f16:1960; GFX11-SDAG: ; %bb.0:1961; GFX11-SDAG-NEXT: s_endpgm1962;1963; GFX11-GISEL-LABEL: v_fcmp_f16:1964; GFX11-GISEL: ; %bb.0:1965; GFX11-GISEL-NEXT: s_load_b64 s[0:1], s[4:5], 0x241966; GFX11-GISEL-NEXT: v_mov_b32_e32 v0, 01967; GFX11-GISEL-NEXT: s_waitcnt lgkmcnt(0)1968; GFX11-GISEL-NEXT: global_store_b64 v0, v[0:1], s[0:1]1969; GFX11-GISEL-NEXT: s_endpgm1970;1971; GFX9-SDAG-LABEL: v_fcmp_f16:1972; GFX9-SDAG: ; %bb.0:1973; GFX9-SDAG-NEXT: s_endpgm1974;1975; GFX9-GISEL-LABEL: v_fcmp_f16:1976; GFX9-GISEL: ; %bb.0:1977; GFX9-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x241978; GFX9-GISEL-NEXT: v_mov_b32_e32 v0, 01979; GFX9-GISEL-NEXT: s_waitcnt lgkmcnt(0)1980; GFX9-GISEL-NEXT: global_store_dwordx2 v0, v[0:1], s[0:1]1981; GFX9-GISEL-NEXT: s_endpgm1982;1983; VI-SDAG-LABEL: v_fcmp_f16:1984; VI-SDAG: ; %bb.0:1985; VI-SDAG-NEXT: s_endpgm1986;1987; VI-GISEL-LABEL: v_fcmp_f16:1988; VI-GISEL: ; %bb.0:1989; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x241990; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)1991; VI-GISEL-NEXT: v_mov_b32_e32 v0, s01992; VI-GISEL-NEXT: v_mov_b32_e32 v1, s11993; VI-GISEL-NEXT: flat_store_dwordx2 v[0:1], v[0:1]1994; VI-GISEL-NEXT: s_endpgm1995 %result = call i64 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 -1)1996 store i64 %result, ptr addrspace(1) %out1997 ret void1998}1999 2000 2001define amdgpu_kernel void @v_fcmp_f16_oeq(ptr addrspace(1) %out, half %src) {2002; GFX11-LABEL: v_fcmp_f16_oeq:2003; GFX11: ; %bb.0:2004; GFX11-NEXT: s_clause 0x12005; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c2006; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x242007; GFX11-NEXT: v_mov_b32_e32 v2, 02008; GFX11-NEXT: s_waitcnt lgkmcnt(0)2009; GFX11-NEXT: v_cmp_eq_f16_e64 s[2:3], 0x5640, s22010; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)2011; GFX11-NEXT: v_mov_b32_e32 v0, s22012; GFX11-NEXT: v_mov_b32_e32 v1, s32013; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]2014; GFX11-NEXT: s_endpgm2015;2016; GFX9-LABEL: v_fcmp_f16_oeq:2017; GFX9: ; %bb.0:2018; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c2019; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242020; GFX9-NEXT: v_mov_b32_e32 v0, 0x56402021; GFX9-NEXT: v_mov_b32_e32 v2, 02022; GFX9-NEXT: s_waitcnt lgkmcnt(0)2023; GFX9-NEXT: v_cmp_eq_f16_e64 s[2:3], s2, v02024; GFX9-NEXT: v_mov_b32_e32 v0, s22025; GFX9-NEXT: v_mov_b32_e32 v1, s32026; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]2027; GFX9-NEXT: s_endpgm2028;2029; VI-SDAG-LABEL: v_fcmp_f16_oeq:2030; VI-SDAG: ; %bb.0:2031; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c2032; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242033; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x56402034; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)2035; VI-SDAG-NEXT: v_cmp_eq_f16_e64 s[2:3], s2, v02036; VI-SDAG-NEXT: v_mov_b32_e32 v0, s02037; VI-SDAG-NEXT: v_mov_b32_e32 v2, s22038; VI-SDAG-NEXT: v_mov_b32_e32 v1, s12039; VI-SDAG-NEXT: v_mov_b32_e32 v3, s32040; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]2041; VI-SDAG-NEXT: s_endpgm2042;2043; VI-GISEL-LABEL: v_fcmp_f16_oeq:2044; VI-GISEL: ; %bb.0:2045; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c2046; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242047; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x56402048; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)2049; VI-GISEL-NEXT: v_cmp_eq_f16_e64 s[2:3], s2, v02050; VI-GISEL-NEXT: v_mov_b32_e32 v0, s22051; VI-GISEL-NEXT: v_mov_b32_e32 v3, s12052; VI-GISEL-NEXT: v_mov_b32_e32 v1, s32053; VI-GISEL-NEXT: v_mov_b32_e32 v2, s02054; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]2055; VI-GISEL-NEXT: s_endpgm2056 %result = call i64 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 1)2057 store i64 %result, ptr addrspace(1) %out2058 ret void2059}2060 2061 2062define amdgpu_kernel void @v_fcmp_f16_one(ptr addrspace(1) %out, half %src) {2063; GFX11-LABEL: v_fcmp_f16_one:2064; GFX11: ; %bb.0:2065; GFX11-NEXT: s_clause 0x12066; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c2067; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x242068; GFX11-NEXT: v_mov_b32_e32 v2, 02069; GFX11-NEXT: s_waitcnt lgkmcnt(0)2070; GFX11-NEXT: v_cmp_neq_f16_e64 s[2:3], 0x5640, s22071; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)2072; GFX11-NEXT: v_mov_b32_e32 v0, s22073; GFX11-NEXT: v_mov_b32_e32 v1, s32074; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]2075; GFX11-NEXT: s_endpgm2076;2077; GFX9-LABEL: v_fcmp_f16_one:2078; GFX9: ; %bb.0:2079; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c2080; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242081; GFX9-NEXT: v_mov_b32_e32 v0, 0x56402082; GFX9-NEXT: v_mov_b32_e32 v2, 02083; GFX9-NEXT: s_waitcnt lgkmcnt(0)2084; GFX9-NEXT: v_cmp_neq_f16_e64 s[2:3], s2, v02085; GFX9-NEXT: v_mov_b32_e32 v0, s22086; GFX9-NEXT: v_mov_b32_e32 v1, s32087; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]2088; GFX9-NEXT: s_endpgm2089;2090; VI-SDAG-LABEL: v_fcmp_f16_one:2091; VI-SDAG: ; %bb.0:2092; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c2093; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242094; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x56402095; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)2096; VI-SDAG-NEXT: v_cmp_neq_f16_e64 s[2:3], s2, v02097; VI-SDAG-NEXT: v_mov_b32_e32 v0, s02098; VI-SDAG-NEXT: v_mov_b32_e32 v2, s22099; VI-SDAG-NEXT: v_mov_b32_e32 v1, s12100; VI-SDAG-NEXT: v_mov_b32_e32 v3, s32101; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]2102; VI-SDAG-NEXT: s_endpgm2103;2104; VI-GISEL-LABEL: v_fcmp_f16_one:2105; VI-GISEL: ; %bb.0:2106; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c2107; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242108; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x56402109; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)2110; VI-GISEL-NEXT: v_cmp_neq_f16_e64 s[2:3], s2, v02111; VI-GISEL-NEXT: v_mov_b32_e32 v0, s22112; VI-GISEL-NEXT: v_mov_b32_e32 v3, s12113; VI-GISEL-NEXT: v_mov_b32_e32 v1, s32114; VI-GISEL-NEXT: v_mov_b32_e32 v2, s02115; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]2116; VI-GISEL-NEXT: s_endpgm2117 %result = call i64 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 6)2118 store i64 %result, ptr addrspace(1) %out2119 ret void2120}2121 2122 2123define amdgpu_kernel void @v_fcmp_f16_ogt(ptr addrspace(1) %out, half %src) {2124; GFX11-LABEL: v_fcmp_f16_ogt:2125; GFX11: ; %bb.0:2126; GFX11-NEXT: s_clause 0x12127; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c2128; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x242129; GFX11-NEXT: v_mov_b32_e32 v2, 02130; GFX11-NEXT: s_waitcnt lgkmcnt(0)2131; GFX11-NEXT: v_cmp_lt_f16_e64 s[2:3], 0x5640, s22132; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)2133; GFX11-NEXT: v_mov_b32_e32 v0, s22134; GFX11-NEXT: v_mov_b32_e32 v1, s32135; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]2136; GFX11-NEXT: s_endpgm2137;2138; GFX9-LABEL: v_fcmp_f16_ogt:2139; GFX9: ; %bb.0:2140; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c2141; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242142; GFX9-NEXT: v_mov_b32_e32 v0, 0x56402143; GFX9-NEXT: v_mov_b32_e32 v2, 02144; GFX9-NEXT: s_waitcnt lgkmcnt(0)2145; GFX9-NEXT: v_cmp_gt_f16_e64 s[2:3], s2, v02146; GFX9-NEXT: v_mov_b32_e32 v0, s22147; GFX9-NEXT: v_mov_b32_e32 v1, s32148; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]2149; GFX9-NEXT: s_endpgm2150;2151; VI-SDAG-LABEL: v_fcmp_f16_ogt:2152; VI-SDAG: ; %bb.0:2153; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c2154; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242155; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x56402156; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)2157; VI-SDAG-NEXT: v_cmp_gt_f16_e64 s[2:3], s2, v02158; VI-SDAG-NEXT: v_mov_b32_e32 v0, s02159; VI-SDAG-NEXT: v_mov_b32_e32 v2, s22160; VI-SDAG-NEXT: v_mov_b32_e32 v1, s12161; VI-SDAG-NEXT: v_mov_b32_e32 v3, s32162; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]2163; VI-SDAG-NEXT: s_endpgm2164;2165; VI-GISEL-LABEL: v_fcmp_f16_ogt:2166; VI-GISEL: ; %bb.0:2167; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c2168; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242169; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x56402170; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)2171; VI-GISEL-NEXT: v_cmp_gt_f16_e64 s[2:3], s2, v02172; VI-GISEL-NEXT: v_mov_b32_e32 v0, s22173; VI-GISEL-NEXT: v_mov_b32_e32 v3, s12174; VI-GISEL-NEXT: v_mov_b32_e32 v1, s32175; VI-GISEL-NEXT: v_mov_b32_e32 v2, s02176; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]2177; VI-GISEL-NEXT: s_endpgm2178 %result = call i64 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 2)2179 store i64 %result, ptr addrspace(1) %out2180 ret void2181}2182 2183 2184define amdgpu_kernel void @v_fcmp_f16_oge(ptr addrspace(1) %out, half %src) {2185; GFX11-LABEL: v_fcmp_f16_oge:2186; GFX11: ; %bb.0:2187; GFX11-NEXT: s_clause 0x12188; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c2189; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x242190; GFX11-NEXT: v_mov_b32_e32 v2, 02191; GFX11-NEXT: s_waitcnt lgkmcnt(0)2192; GFX11-NEXT: v_cmp_le_f16_e64 s[2:3], 0x5640, s22193; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)2194; GFX11-NEXT: v_mov_b32_e32 v0, s22195; GFX11-NEXT: v_mov_b32_e32 v1, s32196; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]2197; GFX11-NEXT: s_endpgm2198;2199; GFX9-LABEL: v_fcmp_f16_oge:2200; GFX9: ; %bb.0:2201; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c2202; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242203; GFX9-NEXT: v_mov_b32_e32 v0, 0x56402204; GFX9-NEXT: v_mov_b32_e32 v2, 02205; GFX9-NEXT: s_waitcnt lgkmcnt(0)2206; GFX9-NEXT: v_cmp_ge_f16_e64 s[2:3], s2, v02207; GFX9-NEXT: v_mov_b32_e32 v0, s22208; GFX9-NEXT: v_mov_b32_e32 v1, s32209; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]2210; GFX9-NEXT: s_endpgm2211;2212; VI-SDAG-LABEL: v_fcmp_f16_oge:2213; VI-SDAG: ; %bb.0:2214; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c2215; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242216; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x56402217; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)2218; VI-SDAG-NEXT: v_cmp_ge_f16_e64 s[2:3], s2, v02219; VI-SDAG-NEXT: v_mov_b32_e32 v0, s02220; VI-SDAG-NEXT: v_mov_b32_e32 v2, s22221; VI-SDAG-NEXT: v_mov_b32_e32 v1, s12222; VI-SDAG-NEXT: v_mov_b32_e32 v3, s32223; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]2224; VI-SDAG-NEXT: s_endpgm2225;2226; VI-GISEL-LABEL: v_fcmp_f16_oge:2227; VI-GISEL: ; %bb.0:2228; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c2229; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242230; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x56402231; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)2232; VI-GISEL-NEXT: v_cmp_ge_f16_e64 s[2:3], s2, v02233; VI-GISEL-NEXT: v_mov_b32_e32 v0, s22234; VI-GISEL-NEXT: v_mov_b32_e32 v3, s12235; VI-GISEL-NEXT: v_mov_b32_e32 v1, s32236; VI-GISEL-NEXT: v_mov_b32_e32 v2, s02237; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]2238; VI-GISEL-NEXT: s_endpgm2239 %result = call i64 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 3)2240 store i64 %result, ptr addrspace(1) %out2241 ret void2242}2243 2244 2245define amdgpu_kernel void @v_fcmp_f16_olt(ptr addrspace(1) %out, half %src) {2246; GFX11-LABEL: v_fcmp_f16_olt:2247; GFX11: ; %bb.0:2248; GFX11-NEXT: s_clause 0x12249; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c2250; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x242251; GFX11-NEXT: v_mov_b32_e32 v2, 02252; GFX11-NEXT: s_waitcnt lgkmcnt(0)2253; GFX11-NEXT: v_cmp_gt_f16_e64 s[2:3], 0x5640, s22254; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)2255; GFX11-NEXT: v_mov_b32_e32 v0, s22256; GFX11-NEXT: v_mov_b32_e32 v1, s32257; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]2258; GFX11-NEXT: s_endpgm2259;2260; GFX9-LABEL: v_fcmp_f16_olt:2261; GFX9: ; %bb.0:2262; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c2263; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242264; GFX9-NEXT: v_mov_b32_e32 v0, 0x56402265; GFX9-NEXT: v_mov_b32_e32 v2, 02266; GFX9-NEXT: s_waitcnt lgkmcnt(0)2267; GFX9-NEXT: v_cmp_lt_f16_e64 s[2:3], s2, v02268; GFX9-NEXT: v_mov_b32_e32 v0, s22269; GFX9-NEXT: v_mov_b32_e32 v1, s32270; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]2271; GFX9-NEXT: s_endpgm2272;2273; VI-SDAG-LABEL: v_fcmp_f16_olt:2274; VI-SDAG: ; %bb.0:2275; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c2276; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242277; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x56402278; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)2279; VI-SDAG-NEXT: v_cmp_lt_f16_e64 s[2:3], s2, v02280; VI-SDAG-NEXT: v_mov_b32_e32 v0, s02281; VI-SDAG-NEXT: v_mov_b32_e32 v2, s22282; VI-SDAG-NEXT: v_mov_b32_e32 v1, s12283; VI-SDAG-NEXT: v_mov_b32_e32 v3, s32284; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]2285; VI-SDAG-NEXT: s_endpgm2286;2287; VI-GISEL-LABEL: v_fcmp_f16_olt:2288; VI-GISEL: ; %bb.0:2289; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c2290; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242291; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x56402292; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)2293; VI-GISEL-NEXT: v_cmp_lt_f16_e64 s[2:3], s2, v02294; VI-GISEL-NEXT: v_mov_b32_e32 v0, s22295; VI-GISEL-NEXT: v_mov_b32_e32 v3, s12296; VI-GISEL-NEXT: v_mov_b32_e32 v1, s32297; VI-GISEL-NEXT: v_mov_b32_e32 v2, s02298; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]2299; VI-GISEL-NEXT: s_endpgm2300 %result = call i64 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 4)2301 store i64 %result, ptr addrspace(1) %out2302 ret void2303}2304 2305 2306define amdgpu_kernel void @v_fcmp_f16_ole(ptr addrspace(1) %out, half %src) {2307; GFX11-LABEL: v_fcmp_f16_ole:2308; GFX11: ; %bb.0:2309; GFX11-NEXT: s_clause 0x12310; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c2311; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x242312; GFX11-NEXT: v_mov_b32_e32 v2, 02313; GFX11-NEXT: s_waitcnt lgkmcnt(0)2314; GFX11-NEXT: v_cmp_ge_f16_e64 s[2:3], 0x5640, s22315; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)2316; GFX11-NEXT: v_mov_b32_e32 v0, s22317; GFX11-NEXT: v_mov_b32_e32 v1, s32318; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]2319; GFX11-NEXT: s_endpgm2320;2321; GFX9-LABEL: v_fcmp_f16_ole:2322; GFX9: ; %bb.0:2323; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c2324; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242325; GFX9-NEXT: v_mov_b32_e32 v0, 0x56402326; GFX9-NEXT: v_mov_b32_e32 v2, 02327; GFX9-NEXT: s_waitcnt lgkmcnt(0)2328; GFX9-NEXT: v_cmp_le_f16_e64 s[2:3], s2, v02329; GFX9-NEXT: v_mov_b32_e32 v0, s22330; GFX9-NEXT: v_mov_b32_e32 v1, s32331; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]2332; GFX9-NEXT: s_endpgm2333;2334; VI-SDAG-LABEL: v_fcmp_f16_ole:2335; VI-SDAG: ; %bb.0:2336; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c2337; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242338; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x56402339; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)2340; VI-SDAG-NEXT: v_cmp_le_f16_e64 s[2:3], s2, v02341; VI-SDAG-NEXT: v_mov_b32_e32 v0, s02342; VI-SDAG-NEXT: v_mov_b32_e32 v2, s22343; VI-SDAG-NEXT: v_mov_b32_e32 v1, s12344; VI-SDAG-NEXT: v_mov_b32_e32 v3, s32345; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]2346; VI-SDAG-NEXT: s_endpgm2347;2348; VI-GISEL-LABEL: v_fcmp_f16_ole:2349; VI-GISEL: ; %bb.0:2350; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c2351; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242352; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x56402353; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)2354; VI-GISEL-NEXT: v_cmp_le_f16_e64 s[2:3], s2, v02355; VI-GISEL-NEXT: v_mov_b32_e32 v0, s22356; VI-GISEL-NEXT: v_mov_b32_e32 v3, s12357; VI-GISEL-NEXT: v_mov_b32_e32 v1, s32358; VI-GISEL-NEXT: v_mov_b32_e32 v2, s02359; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]2360; VI-GISEL-NEXT: s_endpgm2361 %result = call i64 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 5)2362 store i64 %result, ptr addrspace(1) %out2363 ret void2364}2365 2366 2367define amdgpu_kernel void @v_fcmp_f16_ueq(ptr addrspace(1) %out, half %src) {2368; GFX11-LABEL: v_fcmp_f16_ueq:2369; GFX11: ; %bb.0:2370; GFX11-NEXT: s_clause 0x12371; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c2372; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x242373; GFX11-NEXT: v_mov_b32_e32 v2, 02374; GFX11-NEXT: s_waitcnt lgkmcnt(0)2375; GFX11-NEXT: v_cmp_nlg_f16_e64 s[2:3], 0x5640, s22376; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)2377; GFX11-NEXT: v_mov_b32_e32 v0, s22378; GFX11-NEXT: v_mov_b32_e32 v1, s32379; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]2380; GFX11-NEXT: s_endpgm2381;2382; GFX9-LABEL: v_fcmp_f16_ueq:2383; GFX9: ; %bb.0:2384; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c2385; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242386; GFX9-NEXT: v_mov_b32_e32 v0, 0x56402387; GFX9-NEXT: v_mov_b32_e32 v2, 02388; GFX9-NEXT: s_waitcnt lgkmcnt(0)2389; GFX9-NEXT: v_cmp_nlg_f16_e64 s[2:3], s2, v02390; GFX9-NEXT: v_mov_b32_e32 v0, s22391; GFX9-NEXT: v_mov_b32_e32 v1, s32392; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]2393; GFX9-NEXT: s_endpgm2394;2395; VI-SDAG-LABEL: v_fcmp_f16_ueq:2396; VI-SDAG: ; %bb.0:2397; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c2398; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242399; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x56402400; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)2401; VI-SDAG-NEXT: v_cmp_nlg_f16_e64 s[2:3], s2, v02402; VI-SDAG-NEXT: v_mov_b32_e32 v0, s02403; VI-SDAG-NEXT: v_mov_b32_e32 v2, s22404; VI-SDAG-NEXT: v_mov_b32_e32 v1, s12405; VI-SDAG-NEXT: v_mov_b32_e32 v3, s32406; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]2407; VI-SDAG-NEXT: s_endpgm2408;2409; VI-GISEL-LABEL: v_fcmp_f16_ueq:2410; VI-GISEL: ; %bb.0:2411; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c2412; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242413; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x56402414; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)2415; VI-GISEL-NEXT: v_cmp_nlg_f16_e64 s[2:3], s2, v02416; VI-GISEL-NEXT: v_mov_b32_e32 v0, s22417; VI-GISEL-NEXT: v_mov_b32_e32 v3, s12418; VI-GISEL-NEXT: v_mov_b32_e32 v1, s32419; VI-GISEL-NEXT: v_mov_b32_e32 v2, s02420; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]2421; VI-GISEL-NEXT: s_endpgm2422 %result = call i64 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 9)2423 store i64 %result, ptr addrspace(1) %out2424 ret void2425}2426 2427 2428define amdgpu_kernel void @v_fcmp_f16_une(ptr addrspace(1) %out, half %src) {2429; GFX11-LABEL: v_fcmp_f16_une:2430; GFX11: ; %bb.0:2431; GFX11-NEXT: s_clause 0x12432; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c2433; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x242434; GFX11-NEXT: v_mov_b32_e32 v2, 02435; GFX11-NEXT: s_waitcnt lgkmcnt(0)2436; GFX11-NEXT: v_cmp_neq_f16_e64 s[2:3], 0x5640, s22437; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)2438; GFX11-NEXT: v_mov_b32_e32 v0, s22439; GFX11-NEXT: v_mov_b32_e32 v1, s32440; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]2441; GFX11-NEXT: s_endpgm2442;2443; GFX9-LABEL: v_fcmp_f16_une:2444; GFX9: ; %bb.0:2445; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c2446; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242447; GFX9-NEXT: v_mov_b32_e32 v0, 0x56402448; GFX9-NEXT: v_mov_b32_e32 v2, 02449; GFX9-NEXT: s_waitcnt lgkmcnt(0)2450; GFX9-NEXT: v_cmp_neq_f16_e64 s[2:3], s2, v02451; GFX9-NEXT: v_mov_b32_e32 v0, s22452; GFX9-NEXT: v_mov_b32_e32 v1, s32453; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]2454; GFX9-NEXT: s_endpgm2455;2456; VI-SDAG-LABEL: v_fcmp_f16_une:2457; VI-SDAG: ; %bb.0:2458; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c2459; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242460; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x56402461; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)2462; VI-SDAG-NEXT: v_cmp_neq_f16_e64 s[2:3], s2, v02463; VI-SDAG-NEXT: v_mov_b32_e32 v0, s02464; VI-SDAG-NEXT: v_mov_b32_e32 v2, s22465; VI-SDAG-NEXT: v_mov_b32_e32 v1, s12466; VI-SDAG-NEXT: v_mov_b32_e32 v3, s32467; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]2468; VI-SDAG-NEXT: s_endpgm2469;2470; VI-GISEL-LABEL: v_fcmp_f16_une:2471; VI-GISEL: ; %bb.0:2472; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c2473; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242474; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x56402475; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)2476; VI-GISEL-NEXT: v_cmp_neq_f16_e64 s[2:3], s2, v02477; VI-GISEL-NEXT: v_mov_b32_e32 v0, s22478; VI-GISEL-NEXT: v_mov_b32_e32 v3, s12479; VI-GISEL-NEXT: v_mov_b32_e32 v1, s32480; VI-GISEL-NEXT: v_mov_b32_e32 v2, s02481; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]2482; VI-GISEL-NEXT: s_endpgm2483 %result = call i64 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 14)2484 store i64 %result, ptr addrspace(1) %out2485 ret void2486}2487 2488 2489define amdgpu_kernel void @v_fcmp_f16_ugt(ptr addrspace(1) %out, half %src) {2490; GFX11-LABEL: v_fcmp_f16_ugt:2491; GFX11: ; %bb.0:2492; GFX11-NEXT: s_clause 0x12493; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c2494; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x242495; GFX11-NEXT: v_mov_b32_e32 v2, 02496; GFX11-NEXT: s_waitcnt lgkmcnt(0)2497; GFX11-NEXT: v_cmp_nge_f16_e64 s[2:3], 0x5640, s22498; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)2499; GFX11-NEXT: v_mov_b32_e32 v0, s22500; GFX11-NEXT: v_mov_b32_e32 v1, s32501; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]2502; GFX11-NEXT: s_endpgm2503;2504; GFX9-LABEL: v_fcmp_f16_ugt:2505; GFX9: ; %bb.0:2506; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c2507; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242508; GFX9-NEXT: v_mov_b32_e32 v0, 0x56402509; GFX9-NEXT: v_mov_b32_e32 v2, 02510; GFX9-NEXT: s_waitcnt lgkmcnt(0)2511; GFX9-NEXT: v_cmp_nle_f16_e64 s[2:3], s2, v02512; GFX9-NEXT: v_mov_b32_e32 v0, s22513; GFX9-NEXT: v_mov_b32_e32 v1, s32514; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]2515; GFX9-NEXT: s_endpgm2516;2517; VI-SDAG-LABEL: v_fcmp_f16_ugt:2518; VI-SDAG: ; %bb.0:2519; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c2520; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242521; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x56402522; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)2523; VI-SDAG-NEXT: v_cmp_nle_f16_e64 s[2:3], s2, v02524; VI-SDAG-NEXT: v_mov_b32_e32 v0, s02525; VI-SDAG-NEXT: v_mov_b32_e32 v2, s22526; VI-SDAG-NEXT: v_mov_b32_e32 v1, s12527; VI-SDAG-NEXT: v_mov_b32_e32 v3, s32528; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]2529; VI-SDAG-NEXT: s_endpgm2530;2531; VI-GISEL-LABEL: v_fcmp_f16_ugt:2532; VI-GISEL: ; %bb.0:2533; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c2534; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242535; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x56402536; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)2537; VI-GISEL-NEXT: v_cmp_nle_f16_e64 s[2:3], s2, v02538; VI-GISEL-NEXT: v_mov_b32_e32 v0, s22539; VI-GISEL-NEXT: v_mov_b32_e32 v3, s12540; VI-GISEL-NEXT: v_mov_b32_e32 v1, s32541; VI-GISEL-NEXT: v_mov_b32_e32 v2, s02542; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]2543; VI-GISEL-NEXT: s_endpgm2544 %result = call i64 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 10)2545 store i64 %result, ptr addrspace(1) %out2546 ret void2547}2548 2549 2550define amdgpu_kernel void @v_fcmp_f16_uge(ptr addrspace(1) %out, half %src) {2551; GFX11-LABEL: v_fcmp_f16_uge:2552; GFX11: ; %bb.0:2553; GFX11-NEXT: s_clause 0x12554; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c2555; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x242556; GFX11-NEXT: v_mov_b32_e32 v2, 02557; GFX11-NEXT: s_waitcnt lgkmcnt(0)2558; GFX11-NEXT: v_cmp_ngt_f16_e64 s[2:3], 0x5640, s22559; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)2560; GFX11-NEXT: v_mov_b32_e32 v0, s22561; GFX11-NEXT: v_mov_b32_e32 v1, s32562; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]2563; GFX11-NEXT: s_endpgm2564;2565; GFX9-LABEL: v_fcmp_f16_uge:2566; GFX9: ; %bb.0:2567; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c2568; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242569; GFX9-NEXT: v_mov_b32_e32 v0, 0x56402570; GFX9-NEXT: v_mov_b32_e32 v2, 02571; GFX9-NEXT: s_waitcnt lgkmcnt(0)2572; GFX9-NEXT: v_cmp_nlt_f16_e64 s[2:3], s2, v02573; GFX9-NEXT: v_mov_b32_e32 v0, s22574; GFX9-NEXT: v_mov_b32_e32 v1, s32575; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]2576; GFX9-NEXT: s_endpgm2577;2578; VI-SDAG-LABEL: v_fcmp_f16_uge:2579; VI-SDAG: ; %bb.0:2580; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c2581; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242582; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x56402583; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)2584; VI-SDAG-NEXT: v_cmp_nlt_f16_e64 s[2:3], s2, v02585; VI-SDAG-NEXT: v_mov_b32_e32 v0, s02586; VI-SDAG-NEXT: v_mov_b32_e32 v2, s22587; VI-SDAG-NEXT: v_mov_b32_e32 v1, s12588; VI-SDAG-NEXT: v_mov_b32_e32 v3, s32589; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]2590; VI-SDAG-NEXT: s_endpgm2591;2592; VI-GISEL-LABEL: v_fcmp_f16_uge:2593; VI-GISEL: ; %bb.0:2594; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c2595; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242596; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x56402597; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)2598; VI-GISEL-NEXT: v_cmp_nlt_f16_e64 s[2:3], s2, v02599; VI-GISEL-NEXT: v_mov_b32_e32 v0, s22600; VI-GISEL-NEXT: v_mov_b32_e32 v3, s12601; VI-GISEL-NEXT: v_mov_b32_e32 v1, s32602; VI-GISEL-NEXT: v_mov_b32_e32 v2, s02603; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]2604; VI-GISEL-NEXT: s_endpgm2605 %result = call i64 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 11)2606 store i64 %result, ptr addrspace(1) %out2607 ret void2608}2609 2610 2611define amdgpu_kernel void @v_fcmp_f16_ult(ptr addrspace(1) %out, half %src) {2612; GFX11-LABEL: v_fcmp_f16_ult:2613; GFX11: ; %bb.0:2614; GFX11-NEXT: s_clause 0x12615; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c2616; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x242617; GFX11-NEXT: v_mov_b32_e32 v2, 02618; GFX11-NEXT: s_waitcnt lgkmcnt(0)2619; GFX11-NEXT: v_cmp_nle_f16_e64 s[2:3], 0x5640, s22620; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)2621; GFX11-NEXT: v_mov_b32_e32 v0, s22622; GFX11-NEXT: v_mov_b32_e32 v1, s32623; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]2624; GFX11-NEXT: s_endpgm2625;2626; GFX9-LABEL: v_fcmp_f16_ult:2627; GFX9: ; %bb.0:2628; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c2629; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242630; GFX9-NEXT: v_mov_b32_e32 v0, 0x56402631; GFX9-NEXT: v_mov_b32_e32 v2, 02632; GFX9-NEXT: s_waitcnt lgkmcnt(0)2633; GFX9-NEXT: v_cmp_nge_f16_e64 s[2:3], s2, v02634; GFX9-NEXT: v_mov_b32_e32 v0, s22635; GFX9-NEXT: v_mov_b32_e32 v1, s32636; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]2637; GFX9-NEXT: s_endpgm2638;2639; VI-SDAG-LABEL: v_fcmp_f16_ult:2640; VI-SDAG: ; %bb.0:2641; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c2642; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242643; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x56402644; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)2645; VI-SDAG-NEXT: v_cmp_nge_f16_e64 s[2:3], s2, v02646; VI-SDAG-NEXT: v_mov_b32_e32 v0, s02647; VI-SDAG-NEXT: v_mov_b32_e32 v2, s22648; VI-SDAG-NEXT: v_mov_b32_e32 v1, s12649; VI-SDAG-NEXT: v_mov_b32_e32 v3, s32650; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]2651; VI-SDAG-NEXT: s_endpgm2652;2653; VI-GISEL-LABEL: v_fcmp_f16_ult:2654; VI-GISEL: ; %bb.0:2655; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c2656; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242657; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x56402658; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)2659; VI-GISEL-NEXT: v_cmp_nge_f16_e64 s[2:3], s2, v02660; VI-GISEL-NEXT: v_mov_b32_e32 v0, s22661; VI-GISEL-NEXT: v_mov_b32_e32 v3, s12662; VI-GISEL-NEXT: v_mov_b32_e32 v1, s32663; VI-GISEL-NEXT: v_mov_b32_e32 v2, s02664; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]2665; VI-GISEL-NEXT: s_endpgm2666 %result = call i64 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 12)2667 store i64 %result, ptr addrspace(1) %out2668 ret void2669}2670 2671define amdgpu_kernel void @v_fcmp_f16_o(ptr addrspace(1) %out, half %src) {2672; GFX11-LABEL: v_fcmp_f16_o:2673; GFX11: ; %bb.0:2674; GFX11-NEXT: s_clause 0x12675; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c2676; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x242677; GFX11-NEXT: v_mov_b32_e32 v2, 02678; GFX11-NEXT: s_waitcnt lgkmcnt(0)2679; GFX11-NEXT: v_cmp_o_f16_e64 s[2:3], 0x5640, s22680; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)2681; GFX11-NEXT: v_mov_b32_e32 v0, s22682; GFX11-NEXT: v_mov_b32_e32 v1, s32683; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]2684; GFX11-NEXT: s_endpgm2685;2686; GFX9-LABEL: v_fcmp_f16_o:2687; GFX9: ; %bb.0:2688; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c2689; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242690; GFX9-NEXT: v_mov_b32_e32 v0, 0x56402691; GFX9-NEXT: v_mov_b32_e32 v2, 02692; GFX9-NEXT: s_waitcnt lgkmcnt(0)2693; GFX9-NEXT: v_cmp_o_f16_e64 s[2:3], s2, v02694; GFX9-NEXT: v_mov_b32_e32 v0, s22695; GFX9-NEXT: v_mov_b32_e32 v1, s32696; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]2697; GFX9-NEXT: s_endpgm2698;2699; VI-SDAG-LABEL: v_fcmp_f16_o:2700; VI-SDAG: ; %bb.0:2701; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c2702; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242703; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x56402704; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)2705; VI-SDAG-NEXT: v_cmp_o_f16_e64 s[2:3], s2, v02706; VI-SDAG-NEXT: v_mov_b32_e32 v0, s02707; VI-SDAG-NEXT: v_mov_b32_e32 v2, s22708; VI-SDAG-NEXT: v_mov_b32_e32 v1, s12709; VI-SDAG-NEXT: v_mov_b32_e32 v3, s32710; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]2711; VI-SDAG-NEXT: s_endpgm2712;2713; VI-GISEL-LABEL: v_fcmp_f16_o:2714; VI-GISEL: ; %bb.0:2715; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c2716; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242717; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x56402718; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)2719; VI-GISEL-NEXT: v_cmp_o_f16_e64 s[2:3], s2, v02720; VI-GISEL-NEXT: v_mov_b32_e32 v0, s22721; VI-GISEL-NEXT: v_mov_b32_e32 v3, s12722; VI-GISEL-NEXT: v_mov_b32_e32 v1, s32723; VI-GISEL-NEXT: v_mov_b32_e32 v2, s02724; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]2725; VI-GISEL-NEXT: s_endpgm2726 %result = call i64 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 7)2727 store i64 %result, ptr addrspace(1) %out2728 ret void2729}2730 2731define amdgpu_kernel void @v_fcmp_f16_uo(ptr addrspace(1) %out, half %src) {2732; GFX11-LABEL: v_fcmp_f16_uo:2733; GFX11: ; %bb.0:2734; GFX11-NEXT: s_clause 0x12735; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c2736; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x242737; GFX11-NEXT: v_mov_b32_e32 v2, 02738; GFX11-NEXT: s_waitcnt lgkmcnt(0)2739; GFX11-NEXT: v_cmp_u_f16_e64 s[2:3], 0x5640, s22740; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)2741; GFX11-NEXT: v_mov_b32_e32 v0, s22742; GFX11-NEXT: v_mov_b32_e32 v1, s32743; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]2744; GFX11-NEXT: s_endpgm2745;2746; GFX9-LABEL: v_fcmp_f16_uo:2747; GFX9: ; %bb.0:2748; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c2749; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242750; GFX9-NEXT: v_mov_b32_e32 v0, 0x56402751; GFX9-NEXT: v_mov_b32_e32 v2, 02752; GFX9-NEXT: s_waitcnt lgkmcnt(0)2753; GFX9-NEXT: v_cmp_u_f16_e64 s[2:3], s2, v02754; GFX9-NEXT: v_mov_b32_e32 v0, s22755; GFX9-NEXT: v_mov_b32_e32 v1, s32756; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]2757; GFX9-NEXT: s_endpgm2758;2759; VI-SDAG-LABEL: v_fcmp_f16_uo:2760; VI-SDAG: ; %bb.0:2761; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c2762; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242763; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x56402764; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)2765; VI-SDAG-NEXT: v_cmp_u_f16_e64 s[2:3], s2, v02766; VI-SDAG-NEXT: v_mov_b32_e32 v0, s02767; VI-SDAG-NEXT: v_mov_b32_e32 v2, s22768; VI-SDAG-NEXT: v_mov_b32_e32 v1, s12769; VI-SDAG-NEXT: v_mov_b32_e32 v3, s32770; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]2771; VI-SDAG-NEXT: s_endpgm2772;2773; VI-GISEL-LABEL: v_fcmp_f16_uo:2774; VI-GISEL: ; %bb.0:2775; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c2776; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242777; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x56402778; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)2779; VI-GISEL-NEXT: v_cmp_u_f16_e64 s[2:3], s2, v02780; VI-GISEL-NEXT: v_mov_b32_e32 v0, s22781; VI-GISEL-NEXT: v_mov_b32_e32 v3, s12782; VI-GISEL-NEXT: v_mov_b32_e32 v1, s32783; VI-GISEL-NEXT: v_mov_b32_e32 v2, s02784; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]2785; VI-GISEL-NEXT: s_endpgm2786 %result = call i64 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 8)2787 store i64 %result, ptr addrspace(1) %out2788 ret void2789}2790 2791define amdgpu_kernel void @v_fcmp_f16_ule(ptr addrspace(1) %out, half %src) {2792; GFX11-LABEL: v_fcmp_f16_ule:2793; GFX11: ; %bb.0:2794; GFX11-NEXT: s_clause 0x12795; GFX11-NEXT: s_load_b32 s2, s[4:5], 0x2c2796; GFX11-NEXT: s_load_b64 s[0:1], s[4:5], 0x242797; GFX11-NEXT: v_mov_b32_e32 v2, 02798; GFX11-NEXT: s_waitcnt lgkmcnt(0)2799; GFX11-NEXT: v_cmp_nlt_f16_e64 s[2:3], 0x5640, s22800; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)2801; GFX11-NEXT: v_mov_b32_e32 v0, s22802; GFX11-NEXT: v_mov_b32_e32 v1, s32803; GFX11-NEXT: global_store_b64 v2, v[0:1], s[0:1]2804; GFX11-NEXT: s_endpgm2805;2806; GFX9-LABEL: v_fcmp_f16_ule:2807; GFX9: ; %bb.0:2808; GFX9-NEXT: s_load_dword s2, s[4:5], 0x2c2809; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242810; GFX9-NEXT: v_mov_b32_e32 v0, 0x56402811; GFX9-NEXT: v_mov_b32_e32 v2, 02812; GFX9-NEXT: s_waitcnt lgkmcnt(0)2813; GFX9-NEXT: v_cmp_ngt_f16_e64 s[2:3], s2, v02814; GFX9-NEXT: v_mov_b32_e32 v0, s22815; GFX9-NEXT: v_mov_b32_e32 v1, s32816; GFX9-NEXT: global_store_dwordx2 v2, v[0:1], s[0:1]2817; GFX9-NEXT: s_endpgm2818;2819; VI-SDAG-LABEL: v_fcmp_f16_ule:2820; VI-SDAG: ; %bb.0:2821; VI-SDAG-NEXT: s_load_dword s2, s[4:5], 0x2c2822; VI-SDAG-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242823; VI-SDAG-NEXT: v_mov_b32_e32 v0, 0x56402824; VI-SDAG-NEXT: s_waitcnt lgkmcnt(0)2825; VI-SDAG-NEXT: v_cmp_ngt_f16_e64 s[2:3], s2, v02826; VI-SDAG-NEXT: v_mov_b32_e32 v0, s02827; VI-SDAG-NEXT: v_mov_b32_e32 v2, s22828; VI-SDAG-NEXT: v_mov_b32_e32 v1, s12829; VI-SDAG-NEXT: v_mov_b32_e32 v3, s32830; VI-SDAG-NEXT: flat_store_dwordx2 v[0:1], v[2:3]2831; VI-SDAG-NEXT: s_endpgm2832;2833; VI-GISEL-LABEL: v_fcmp_f16_ule:2834; VI-GISEL: ; %bb.0:2835; VI-GISEL-NEXT: s_load_dword s2, s[4:5], 0x2c2836; VI-GISEL-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x242837; VI-GISEL-NEXT: v_mov_b32_e32 v0, 0x56402838; VI-GISEL-NEXT: s_waitcnt lgkmcnt(0)2839; VI-GISEL-NEXT: v_cmp_ngt_f16_e64 s[2:3], s2, v02840; VI-GISEL-NEXT: v_mov_b32_e32 v0, s22841; VI-GISEL-NEXT: v_mov_b32_e32 v3, s12842; VI-GISEL-NEXT: v_mov_b32_e32 v1, s32843; VI-GISEL-NEXT: v_mov_b32_e32 v2, s02844; VI-GISEL-NEXT: flat_store_dwordx2 v[2:3], v[0:1]2845; VI-GISEL-NEXT: s_endpgm2846 %result = call i64 @llvm.amdgcn.fcmp.f16(half %src, half 100.00, i32 13)2847 store i64 %result, ptr addrspace(1) %out2848 ret void2849}2850 2851attributes #0 = { nounwind readnone convergent }2852