Skip to content

Commit 67ea4de

Browse files
authored
AMDGPU: Regenerate test checks (#188862)
1 parent 29886a1 commit 67ea4de

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

llvm/test/CodeGen/AMDGPU/fract-match.ll

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2-
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
32
; Test with buggy fract, shouldn't match
43
; RUN: opt -S -mtriple=amdgcn-amd-amdpal -mcpu=tahiti -amdgpu-codegenprepare %s | FileCheck -check-prefixes=IR,GFX6-IR %s
54

@@ -3938,6 +3937,28 @@ define double @fract_match_f64_assume_not_nan(double %x) #0 {
39383937
; GFX12-NEXT: s_delay_alu instid0(VALU_DEP_2)
39393938
; GFX12-NEXT: v_dual_cndmask_b32 v0, 0, v2 :: v_dual_cndmask_b32 v1, 0, v3
39403939
; GFX12-NEXT: s_setpc_b64 s[30:31]
3940+
; GFX6-IR-LABEL: define double @fract_match_f64_assume_not_nan(
3941+
; GFX6-IR-SAME: double [[X:%.*]]) #[[ATTR1:[0-9]+]] {
3942+
; GFX6-IR-NEXT: [[ENTRY:.*:]]
3943+
; GFX6-IR-NEXT: [[IS_ORD:%.*]] = fcmp ord double [[X]], 0.000000e+00
3944+
; GFX6-IR-NEXT: tail call void @llvm.assume(i1 [[IS_ORD]])
3945+
; GFX6-IR-NEXT: [[FLOOR:%.*]] = tail call double @llvm.floor.f64(double [[X]])
3946+
; GFX6-IR-NEXT: [[SUB:%.*]] = fsub double [[X]], [[FLOOR]]
3947+
; GFX6-IR-NEXT: [[MIN:%.*]] = tail call double @llvm.minnum.f64(double [[SUB]], double 0x3FEFFFFFFFFFFFFF)
3948+
; GFX6-IR-NEXT: [[X_ABS:%.*]] = tail call double @llvm.fabs.f64(double [[X]])
3949+
; GFX6-IR-NEXT: [[IS_INF:%.*]] = fcmp oeq double [[X_ABS]], 0x7FF0000000000000
3950+
; GFX6-IR-NEXT: [[RESULT:%.*]] = select i1 [[IS_INF]], double 0.000000e+00, double [[MIN]]
3951+
; GFX6-IR-NEXT: ret double [[RESULT]]
3952+
; IR-FRACT-LABEL: define double @fract_match_f64_assume_not_nan(
3953+
; IR-FRACT-SAME: double [[X:%.*]]) #[[ATTR1:[0-9]+]] {
3954+
; IR-FRACT-NEXT: [[ENTRY:.*:]]
3955+
; IR-FRACT-NEXT: [[IS_ORD:%.*]] = fcmp ord double [[X]], 0.000000e+00
3956+
; IR-FRACT-NEXT: tail call void @llvm.assume(i1 [[IS_ORD]])
3957+
; IR-FRACT-NEXT: [[MIN:%.*]] = call nnan double @llvm.amdgcn.fract.f64(double [[X]])
3958+
; IR-FRACT-NEXT: [[X_ABS:%.*]] = tail call double @llvm.fabs.f64(double [[X]])
3959+
; IR-FRACT-NEXT: [[IS_INF:%.*]] = fcmp oeq double [[X_ABS]], 0x7FF0000000000000
3960+
; IR-FRACT-NEXT: [[RESULT:%.*]] = select i1 [[IS_INF]], double 0.000000e+00, double [[MIN]]
3961+
; IR-FRACT-NEXT: ret double [[RESULT]]
39413962
entry:
39423963
%is.ord = fcmp ord double %x, 0.000000e+00
39433964
tail call void @llvm.assume(i1 %is.ord)

0 commit comments

Comments
 (0)