Skip to content

Commit 00232c3

Browse files
committed
Fix testcase
1 parent ad37957 commit 00232c3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

llvm/test/CodeGen/AMDGPU/llvm.abs.ll

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,13 @@ define amdgpu_cs i16 @abs_sgpr_i16(i16 inreg %arg) {
7272
}
7373

7474
define amdgpu_ps i16 @abs_sgpr_i16_neg(i16 inreg %arg) {
75+
; COM: Suboptimal code generation on Tahiti.
7576
; SDAG6-LABEL: abs_sgpr_i16_neg:
7677
; SDAG6: ; %bb.0:
77-
; SDAG6-NEXT: s_sext_i32_i16 s0, s0
78-
; SDAG6-NEXT: s_abs_i32 s0, s0
79-
; SDAG6-NEXT: s_sub_i32 s0, 0, s0
78+
; SDAG6-NEXT: s_sext_i32_i16 s1, s0
79+
; SDAG6-NEXT: s_ashr_i32 s1, s1, 15
80+
; SDAG6-NEXT: s_xor_b32 s0, s0, s1
81+
; SDAG6-NEXT: s_sub_i32 s0, s1, s0
8082
; SDAG6-NEXT: ; return to shader part epilog
8183
;
8284
; SDAG8-LABEL: abs_sgpr_i16_neg:

0 commit comments

Comments
 (0)