We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9441a1e commit 109220dCopy full SHA for 109220d
llvm/test/CodeGen/AMDGPU/llvm.abs.ll
@@ -72,11 +72,13 @@ define amdgpu_cs i16 @abs_sgpr_i16(i16 inreg %arg) {
72
}
73
74
define amdgpu_ps i16 @abs_sgpr_i16_neg(i16 inreg %arg) {
75
+; COM: Suboptimal code generation on Tahiti.
76
; SDAG6-LABEL: abs_sgpr_i16_neg:
77
; SDAG6: ; %bb.0:
-; 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
+; SDAG6-NEXT: s_sext_i32_i16 s1, s0
+; 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
82
; SDAG6-NEXT: ; return to shader part epilog
83
;
84
; SDAG8-LABEL: abs_sgpr_i16_neg:
0 commit comments