llvm-project/llvm/test/CodeGen/AMDGPU/i1-copy-implicit-def.ll
Matt Arsenault 8cc6c2e80f
AMDGPU: Migrate more tests away from undef (#131314)
andorbitset.ll is interesting since it directly depends on the
difference between poison and undef. Not sure it's useful to keep
the version using poison, I assume none of this code makes it to
codegen.

si-spill-cf.ll was also a nasty case, which I doubt has been reproducing
its original issue for a very long time. I had to reclaim an older version,
replace some of the poison uses, and run simplify-cfg. There's a very
slight change in the final CFG with this, but final the output is approximately
the same as it used to be.
2025-03-17 15:57:47 +07:00

37 lines
844 B
LLVM

; RUN: llc -mtriple=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=SI %s
; RUN: llc -mtriple=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=SI %s
; SILowerI1Copies was not handling IMPLICIT_DEF
; SI-LABEL: {{^}}br_poison:
; SI: %bb.0:
; SI-NEXT: s_cbranch_scc1
define amdgpu_kernel void @br_poison(ptr addrspace(1) %out, i32 %arg) #0 {
bb:
br i1 poison, label %bb1, label %bb2
bb1:
store volatile i32 123, ptr addrspace(1) %out
ret void
bb2:
ret void
}
; SI-LABEL: {{^}}br_freeze_poison:
; SI: %bb.0:
; SI-NEXT: s_cbranch_scc1
define amdgpu_kernel void @br_freeze_poison(ptr addrspace(1) %out, i32 %arg) #0 {
bb:
%undef = freeze i1 poison
br i1 %undef, label %bb1, label %bb2
bb1:
store volatile i32 123, ptr addrspace(1) %out
ret void
bb2:
ret void
}
attributes #0 = { nounwind }