Skip to content

Commit 6aae94e

Browse files
committed
update tests
1 parent 019b3b4 commit 6aae94e

File tree

2 files changed

+8
-8
lines changed
  • llvm/test/CodeGen/LoongArch

2 files changed

+8
-8
lines changed

llvm/test/CodeGen/LoongArch/lasx/ir-instruction/absd.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
;; 1. trunc(abs(sub(sext(a),sext(b)))) -> abds(a,b) or abdu(a,b)
66
;; 2. abs(sub_nsw(x, y)) -> abds(a,b)
77
;; 3. sub(smax(a,b),smin(a,b)) -> abds(a,b) or abdu(a,b)
8-
;; 4. select(icmp(a,b),sub(a,b),sub(b,a)) -> abds(a,b) or abdu(a,b)
8+
;; 4. select(icmp(a,b, slt|ult),sub(a,b),sub(b,a)) -> abds(a,b) or abdu(a,b)
99
;; 5. sub(select(icmp(a,b),a,b),select(icmp(a,b),b,a)) -> abds(a,b) or abdu(a,b)
1010
;;
11-
;; abds / abdu can be lower to xvabsd.{b/h/w/d} / xvabsd.{b/h/w/d}u instruction.
11+
;; abds / abdu can be lowered to xvabsd.{b/h/w/d} / xvabsd.{b/h/w/d}u instruction.
1212
;;
1313
;; Later patch will address it.
1414

@@ -300,7 +300,7 @@ define <32 x i8> @maxmin_bu_com1(<32 x i8> %0, <32 x i8> %1) {
300300
ret <32 x i8> %sub
301301
}
302302

303-
;; select(icmp(a,b),sub(a,b),sub(b,a)) -> abds(a,b)
303+
;; select(icmp(a,b, slt),sub(a,b),sub(b,a)) -> abds(a,b)
304304
define <32 x i8> @xvabsd_b_cmp(<32 x i8> %a, <32 x i8> %b) nounwind {
305305
; CHECK-LABEL: xvabsd_b_cmp:
306306
; CHECK: # %bb.0:
@@ -413,7 +413,7 @@ define <4 x i64> @xvabsd_du_cmp(<4 x i64> %a, <4 x i64> %b) nounwind {
413413
ret <4 x i64> %sel
414414
}
415415

416-
;; sub(select(icmp(a,b),a,b),select(icmp(a,b),b,a)) -> abds(a,b)
416+
;; sub(select(icmp(a,b, slt),a,b),select(icmp(a,b, slt),b,a)) -> abds(a,b)
417417
define <32 x i8> @xvabsd_b_select(<32 x i8> %a, <32 x i8> %b) nounwind {
418418
; CHECK-LABEL: xvabsd_b_select:
419419
; CHECK: # %bb.0:

llvm/test/CodeGen/LoongArch/lsx/ir-instruction/absd.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
;; 1. trunc(abs(sub(sext(a),sext(b)))) -> abds(a,b) or abdu(a,b)
66
;; 2. abs(sub_nsw(x, y)) -> abds(a,b)
77
;; 3. sub(smax(a,b),smin(a,b)) -> abds(a,b) or abdu(a,b)
8-
;; 4. select(icmp(a,b),sub(a,b),sub(b,a)) -> abds(a,b) or abdu(a,b)
8+
;; 4. select(icmp(a,b, slt|ult),sub(a,b),sub(b,a)) -> abds(a,b) or abdu(a,b)
99
;; 5. sub(select(icmp(a,b),a,b),select(icmp(a,b),b,a)) -> abds(a,b) or abdu(a,b)
1010
;;
11-
;; abds / abdu can be lower to vabsd.{b/h/w/d} / vabsd.{b/h/w/d}u instruction
11+
;; abds / abdu can be lowered to vabsd.{b/h/w/d} / vabsd.{b/h/w/d}u instruction
1212
;;
1313
;; Later patch will address it.
1414

@@ -300,7 +300,7 @@ define <16 x i8> @maxmin_bu_com1(<16 x i8> %0, <16 x i8> %1) {
300300
ret <16 x i8> %sub
301301
}
302302

303-
;; select(icmp(a,b),sub(a,b),sub(b,a)) -> abds(a,b)
303+
;; select(icmp(a,b, slt),sub(a,b),sub(b,a)) -> abds(a,b)
304304
define <16 x i8> @vabsd_b_cmp(<16 x i8> %a, <16 x i8> %b) nounwind {
305305
; CHECK-LABEL: vabsd_b_cmp:
306306
; CHECK: # %bb.0:
@@ -413,7 +413,7 @@ define <2 x i64> @vabsd_du_cmp(<2 x i64> %a, <2 x i64> %b) nounwind {
413413
ret <2 x i64> %sel
414414
}
415415

416-
;; sub(select(icmp(a,b),a,b),select(icmp(a,b),b,a)) -> abds(a,b)
416+
;; sub(select(icmp(a,b, slt),a,b),select(icmp(a,b, slt),b,a)) -> abds(a,b)
417417
define <16 x i8> @vabsd_b_select(<16 x i8> %a, <16 x i8> %b) nounwind {
418418
; CHECK-LABEL: vabsd_b_select:
419419
; CHECK: # %bb.0:

0 commit comments

Comments
 (0)