1# RUN: llc -march=amdgcn -mcpu=gfx1010 -verify-machineinstrs -run-pass post-RA-hazard-rec -o - %s | FileCheck -check-prefix=GCN %s 2 3# GCN-LABEL: name: flat_atomic_fcmpswap_to_s_denorm_mode 4# GCN: FLAT_ATOMIC_FCMPSWAP 5# GCN-NEXT: S_NOP 2 6# GCN-NEXT: S_DENORM_MODE 7--- 8name: flat_atomic_fcmpswap_to_s_denorm_mode 9body: | 10 bb.0: 11 FLAT_ATOMIC_FCMPSWAP undef %0:vreg_64, undef %1:vreg_64, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 12 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 13... 14 15# GCN-LABEL: name: flat_atomic_fcmpswap_x2_to_s_denorm_mode 16# GCN: FLAT_ATOMIC_FCMPSWAP_X2 17# GCN-NEXT: S_NOP 2 18# GCN-NEXT: S_DENORM_MODE 19--- 20name: flat_atomic_fcmpswap_x2_to_s_denorm_mode 21body: | 22 bb.0: 23 FLAT_ATOMIC_FCMPSWAP_X2 undef %0:vreg_64, undef %1:vreg_128, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 24 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 25... 26 27# GCN-LABEL: name: flat_atomic_fmax_to_s_denorm_mode 28# GCN: FLAT_ATOMIC_FMAX 29# GCN-NEXT: S_NOP 2 30# GCN-NEXT: S_DENORM_MODE 31--- 32name: flat_atomic_fmax_to_s_denorm_mode 33body: | 34 bb.0: 35 FLAT_ATOMIC_FMAX undef %0:vreg_64, undef %1:vgpr_32, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 36 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 37... 38 39# GCN-LABEL: name: flat_atomic_fmax_x2_to_s_denorm_mode 40# GCN: FLAT_ATOMIC_FMAX_X2 41# GCN-NEXT: S_NOP 2 42# GCN-NEXT: S_DENORM_MODE 43--- 44name: flat_atomic_fmax_x2_to_s_denorm_mode 45body: | 46 bb.0: 47 FLAT_ATOMIC_FMAX_X2 undef %0:vreg_64, undef %1:vreg_64, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 48 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 49... 50 51# GCN-LABEL: name: flat_atomic_fmin_to_s_denorm_mode 52# GCN: FLAT_ATOMIC_FMIN 53# GCN-NEXT: S_NOP 2 54# GCN-NEXT: S_DENORM_MODE 55--- 56name: flat_atomic_fmin_to_s_denorm_mode 57body: | 58 bb.0: 59 FLAT_ATOMIC_FMIN undef %0:vreg_64, undef %1:vgpr_32, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 60 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 61... 62 63# GCN-LABEL: name: flat_atomic_fmin_x2_to_s_denorm_mode 64# GCN: FLAT_ATOMIC_FMIN_X2 65# GCN-NEXT: S_NOP 2 66# GCN-NEXT: S_DENORM_MODE 67--- 68name: flat_atomic_fmin_x2_to_s_denorm_mode 69body: | 70 bb.0: 71 FLAT_ATOMIC_FMIN_X2 undef %0:vreg_64, undef %1:vreg_64, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 72 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 73... 74 75# GCN-LABEL: name: flat_atomic_fcmpswap_x2_rtn_to_s_denorm_mode 76# GCN: FLAT_ATOMIC_FCMPSWAP_X2_RTN 77# GCN-NEXT: S_NOP 2 78# GCN-NEXT: S_DENORM_MODE 79--- 80name: flat_atomic_fcmpswap_x2_rtn_to_s_denorm_mode 81body: | 82 bb.0: 83 %2:vreg_64 = FLAT_ATOMIC_FCMPSWAP_X2_RTN undef %0:vreg_64, undef %1:vreg_128, 0, -1, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 84 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 85... 86 87# GCN-LABEL: name: flat_atomic_fmax_rtn_to_s_denorm_mode 88# GCN: FLAT_ATOMIC_FMAX_RTN 89# GCN-NEXT: S_NOP 2 90# GCN-NEXT: S_DENORM_MODE 91--- 92name: flat_atomic_fmax_rtn_to_s_denorm_mode 93body: | 94 bb.0: 95 %2:vgpr_32 = FLAT_ATOMIC_FMAX_RTN undef %0:vreg_64, undef %1:vgpr_32, 0, -1, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 96 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 97... 98 99# GCN-LABEL: name: flat_atomic_fmax_x2_rtn_to_s_denorm_mode 100# GCN: FLAT_ATOMIC_FMAX_X2_RTN 101# GCN-NEXT: S_NOP 2 102# GCN-NEXT: S_DENORM_MODE 103--- 104name: flat_atomic_fmax_x2_rtn_to_s_denorm_mode 105body: | 106 bb.0: 107 %2:vreg_64 = FLAT_ATOMIC_FMAX_X2_RTN undef %0:vreg_64, undef %1:vreg_64, 0, -1, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 108 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 109... 110 111# GCN-LABEL: name: flat_atomic_fmin_rtn_to_s_denorm_mode 112# GCN: FLAT_ATOMIC_FMIN_RTN 113# GCN-NEXT: S_NOP 2 114# GCN-NEXT: S_DENORM_MODE 115--- 116name: flat_atomic_fmin_rtn_to_s_denorm_mode 117body: | 118 bb.0: 119 %2:vgpr_32 = FLAT_ATOMIC_FMIN_RTN undef %0:vreg_64, undef %1:vgpr_32, 0, -1, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 120 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 121... 122 123# GCN-LABEL: name: flat_atomic_fmin_x2_rtn_to_s_denorm_mode 124# GCN: FLAT_ATOMIC_FMIN_X2_RTN 125# GCN-NEXT: S_NOP 2 126# GCN-NEXT: S_DENORM_MODE 127--- 128name: flat_atomic_fmin_x2_rtn_to_s_denorm_mode 129body: | 130 bb.0: 131 %2:vreg_64 = FLAT_ATOMIC_FMIN_X2_RTN undef %0:vreg_64, undef %1:vreg_64, 0, -1, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 132 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 133... 134 135# GCN-LABEL: name: flat_atomic_fcmpswap_rtn_to_s_denorm_mode 136# GCN: FLAT_ATOMIC_FCMPSWAP_RTN 137# GCN-NEXT: S_NOP 2 138# GCN-NEXT: S_DENORM_MODE 139--- 140name: flat_atomic_fcmpswap_rtn_to_s_denorm_mode 141body: | 142 bb.0: 143 %2:vgpr_32 = FLAT_ATOMIC_FCMPSWAP_RTN undef %0:vreg_64, undef %1:vreg_64, 0, -1, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 144 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 145... 146 147# GCN-LABEL: name: global_atomic_fcmpswap_to_s_denorm_mode 148# GCN: GLOBAL_ATOMIC_FCMPSWAP 149# GCN-NEXT: S_NOP 2 150# GCN-NEXT: S_DENORM_MODE 151--- 152name: global_atomic_fcmpswap_to_s_denorm_mode 153body: | 154 bb.0: 155 GLOBAL_ATOMIC_FCMPSWAP undef %0:vreg_64, undef %1:vgpr_32, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 156 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 157... 158 159# GCN-LABEL: name: global_atomic_fcmpswap_x2_to_s_denorm_mode 160# GCN: GLOBAL_ATOMIC_FCMPSWAP_X2 161# GCN-NEXT: S_NOP 2 162# GCN-NEXT: S_DENORM_MODE 163--- 164name: global_atomic_fcmpswap_x2_to_s_denorm_mode 165body: | 166 bb.0: 167 GLOBAL_ATOMIC_FCMPSWAP_X2 undef %0:vreg_64, undef %1:vreg_64, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 168 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 169... 170 171# GCN-LABEL: name: global_atomic_fmax_to_s_denorm_mode 172# GCN: GLOBAL_ATOMIC_FMAX 173# GCN-NEXT: S_NOP 2 174# GCN-NEXT: S_DENORM_MODE 175--- 176name: global_atomic_fmax_to_s_denorm_mode 177body: | 178 bb.0: 179 GLOBAL_ATOMIC_FMAX undef %0:vreg_64, undef %1:vgpr_32, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 180 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 181... 182 183# GCN-LABEL: name: global_atomic_fmax_x2_to_s_denorm_mode 184# GCN: GLOBAL_ATOMIC_FMAX_X2 185# GCN-NEXT: S_NOP 2 186# GCN-NEXT: S_DENORM_MODE 187--- 188name: global_atomic_fmax_x2_to_s_denorm_mode 189body: | 190 bb.0: 191 GLOBAL_ATOMIC_FMAX_X2 undef %0:vreg_64, undef %1:vreg_64, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 192 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 193... 194 195# GCN-LABEL: name: global_atomic_fmin_to_s_denorm_mode 196# GCN: GLOBAL_ATOMIC_FMIN 197# GCN-NEXT: S_NOP 2 198# GCN-NEXT: S_DENORM_MODE 199--- 200name: global_atomic_fmin_to_s_denorm_mode 201body: | 202 bb.0: 203 GLOBAL_ATOMIC_FMIN undef %0:vreg_64, undef %1:vgpr_32, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 204 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 205... 206 207# GCN-LABEL: name: global_atomic_fmin_x2_to_s_denorm_mode 208# GCN: GLOBAL_ATOMIC_FMIN_X2 209# GCN-NEXT: S_NOP 2 210# GCN-NEXT: S_DENORM_MODE 211--- 212name: global_atomic_fmin_x2_to_s_denorm_mode 213body: | 214 bb.0: 215 GLOBAL_ATOMIC_FMIN_X2 undef %0:vreg_64, undef %1:vreg_64, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 216 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 217... 218 219# GCN-LABEL: name: global_atomic_fcmpswap_rtn_to_s_denorm_mode 220# GCN: GLOBAL_ATOMIC_FCMPSWAP_RTN 221# GCN-NEXT: S_NOP 2 222# GCN-NEXT: S_DENORM_MODE 223--- 224name: global_atomic_fcmpswap_rtn_to_s_denorm_mode 225body: | 226 bb.0: 227 %2:vgpr_32 = GLOBAL_ATOMIC_FCMPSWAP_RTN undef %0:vreg_64, undef %1:vgpr_32, 0, -1, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 228 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 229... 230 231# GCN-LABEL: name: global_atomic_fcmpswap_x2_rtn_to_s_denorm_mode 232# GCN: GLOBAL_ATOMIC_FCMPSWAP_X2_RTN 233# GCN-NEXT: S_NOP 2 234# GCN-NEXT: S_DENORM_MODE 235--- 236name: global_atomic_fcmpswap_x2_rtn_to_s_denorm_mode 237body: | 238 bb.0: 239 %2:vreg_64 = GLOBAL_ATOMIC_FCMPSWAP_X2_RTN undef %0:vreg_64, undef %1:vreg_64, 0, -1, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 240 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 241... 242 243# GCN-LABEL: name: global_atomic_fmax_rtn_to_s_denorm_mode 244# GCN: GLOBAL_ATOMIC_FMAX_RTN 245# GCN-NEXT: S_NOP 2 246# GCN-NEXT: S_DENORM_MODE 247--- 248name: global_atomic_fmax_rtn_to_s_denorm_mode 249body: | 250 bb.0: 251 %2:vgpr_32 = GLOBAL_ATOMIC_FMAX_RTN undef %0:vreg_64, undef %1:vgpr_32, 0, -1, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 252 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 253... 254 255# GCN-LABEL: name: global_atomic_fmax_x2_rtn_to_s_denorm_mode 256# GCN: GLOBAL_ATOMIC_FMAX_X2_RTN 257# GCN-NEXT: S_NOP 2 258# GCN-NEXT: S_DENORM_MODE 259--- 260name: global_atomic_fmax_x2_rtn_to_s_denorm_mode 261body: | 262 bb.0: 263 %2:vreg_64 = GLOBAL_ATOMIC_FMAX_X2_RTN undef %0:vreg_64, undef %1:vreg_64, 0, -1, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 264 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 265... 266 267# GCN-LABEL: name: global_atomic_fmin_rtn_to_s_denorm_mode 268# GCN: GLOBAL_ATOMIC_FMIN_RTN 269# GCN-NEXT: S_NOP 2 270# GCN-NEXT: S_DENORM_MODE 271--- 272name: global_atomic_fmin_rtn_to_s_denorm_mode 273body: | 274 bb.0: 275 %2:vgpr_32 = GLOBAL_ATOMIC_FMIN_RTN undef %0:vreg_64, undef %1:vgpr_32, 0, -1, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 276 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 277... 278 279# GCN-LABEL: name: global_atomic_fmin_x2_rtn_to_s_denorm_mode 280# GCN: GLOBAL_ATOMIC_FMIN_X2_RTN 281# GCN-NEXT: S_NOP 2 282# GCN-NEXT: S_DENORM_MODE 283--- 284name: global_atomic_fmin_x2_rtn_to_s_denorm_mode 285body: | 286 bb.0: 287 %2:vreg_64 = GLOBAL_ATOMIC_FMIN_X2_RTN undef %0:vreg_64, undef %1:vreg_64, 0, -1, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 288 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 289... 290 291# GCN-LABEL: name: global_atomic_fcmpswap_saddr_to_s_denorm_mode 292# GCN: GLOBAL_ATOMIC_FCMPSWAP_SADDR 293# GCN-NEXT: S_NOP 2 294# GCN-NEXT: S_DENORM_MODE 295--- 296name: global_atomic_fcmpswap_saddr_to_s_denorm_mode 297body: | 298 bb.0: 299 GLOBAL_ATOMIC_FCMPSWAP_SADDR undef %0:vgpr_32, undef %1:vgpr_32, undef %3:sgpr_64, 0, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 300 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 301... 302 303# GCN-LABEL: name: global_atomic_fcmpswap_x2_saddr_rtn_to_s_denorm_mode 304# GCN: GLOBAL_ATOMIC_FCMPSWAP_X2_SADDR_RTN 305# GCN-NEXT: S_NOP 2 306# GCN-NEXT: S_DENORM_MODE 307--- 308name: global_atomic_fcmpswap_x2_saddr_rtn_to_s_denorm_mode 309body: | 310 bb.0: 311 %2:vreg_64 = GLOBAL_ATOMIC_FCMPSWAP_X2_SADDR_RTN undef %0:vgpr_32, undef %1:vreg_64, undef %3:sgpr_64, 0, -1, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 312 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 313... 314 315# GCN-LABEL: name: global_atomic_fmax_saddr_rtn_to_s_denorm_mode 316# GCN: GLOBAL_ATOMIC_FMAX_SADDR_RTN 317# GCN-NEXT: S_NOP 2 318# GCN-NEXT: S_DENORM_MODE 319--- 320name: global_atomic_fmax_saddr_rtn_to_s_denorm_mode 321body: | 322 bb.0: 323 %2:vgpr_32 = GLOBAL_ATOMIC_FMAX_SADDR_RTN undef %0:vgpr_32, undef %1:vgpr_32, undef %3:sgpr_64, 0, -1, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 324 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 325... 326 327# GCN-LABEL: name: global_atomic_fmax_x2_saddr_rtn_to_s_denorm_mode 328# GCN: GLOBAL_ATOMIC_FMAX_X2_SADDR_RTN 329# GCN-NEXT: S_NOP 2 330# GCN-NEXT: S_DENORM_MODE 331--- 332name: global_atomic_fmax_x2_saddr_rtn_to_s_denorm_mode 333body: | 334 bb.0: 335 %2:vreg_64 = GLOBAL_ATOMIC_FMAX_X2_SADDR_RTN undef %0:vgpr_32, undef %1:vreg_64, undef %3:sgpr_64, 0, -1, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 336 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 337... 338 339# GCN-LABEL: name: global_atomic_fmin_saddr_rtn_to_s_denorm_mode 340# GCN: GLOBAL_ATOMIC_FMIN_SADDR_RTN 341# GCN-NEXT: S_NOP 2 342# GCN-NEXT: S_DENORM_MODE 343--- 344name: global_atomic_fmin_saddr_rtn_to_s_denorm_mode 345body: | 346 bb.0: 347 %2:vgpr_32 = GLOBAL_ATOMIC_FMIN_SADDR_RTN undef %0:vgpr_32, undef %1:vgpr_32, undef %3:sgpr_64, 0, -1, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 348 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 349... 350 351# GCN-LABEL: name: global_atomic_fmin_x2_saddr_rtn_to_s_denorm_mode 352# GCN: GLOBAL_ATOMIC_FMIN_X2_SADDR_RTN 353# GCN-NEXT: S_NOP 2 354# GCN-NEXT: S_DENORM_MODE 355--- 356name: global_atomic_fmin_x2_saddr_rtn_to_s_denorm_mode 357body: | 358 bb.0: 359 %2:vreg_64 = GLOBAL_ATOMIC_FMIN_X2_SADDR_RTN undef %0:vgpr_32, undef %1:vreg_64, undef %3:sgpr_64, 0, -1, 0, implicit $exec :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 360 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 361... 362 363# GCN-LABEL: name: flat_fp_atomic_to_s_denorm_mode_waitcnt 364# GCN: FLAT_ATOMIC_FMIN 365# GCN-NEXT: S_WAITCNT 366# GCN-NEXT: S_DENORM_MODE 367--- 368name: flat_fp_atomic_to_s_denorm_mode_waitcnt 369body: | 370 bb.0: 371 FLAT_ATOMIC_FMIN undef %0:vreg_64, undef %1:vgpr_32, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 372 S_WAITCNT 0 373 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 374... 375 376# GCN-LABEL: name: flat_fp_atomic_to_s_denorm_mode_valu 377# GCN: FLAT_ATOMIC_FMIN 378# GCN-NEXT: V_ADD_F32_e32 379# GCN-NEXT: S_DENORM_MODE 380--- 381name: flat_fp_atomic_to_s_denorm_mode_valu 382body: | 383 bb.0: 384 FLAT_ATOMIC_FMIN undef %0:vreg_64, undef %1:vgpr_32, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load store seq_cst seq_cst 4 on `float addrspace(1)* undef`) 385 %2:vgpr_32 = V_ADD_F32_e32 undef %1:vgpr_32, undef %1:vgpr_32, implicit $mode, implicit $exec 386 S_DENORM_MODE 0, implicit-def $mode, implicit $mode 387... 388