[llvm] 5787ad6 - [AArch64] update popcount pre-patch test; NFC
Shawn Landden via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 8 02:14:56 PDT 2020
Author: Shawn Landden
Date: 2020-06-08T13:14:44+04:00
New Revision: 5787ad6c918a240301ba5881c939c8a565da174e
URL: https://github.com/llvm/llvm-project/commit/5787ad6c918a240301ba5881c939c8a565da174e
DIFF: https://github.com/llvm/llvm-project/commit/5787ad6c918a240301ba5881c939c8a565da174e.diff
LOG: [AArch64] update popcount pre-patch test; NFC
Added:
Modified:
llvm/test/CodeGen/AArch64/popcount.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/AArch64/popcount.ll b/llvm/test/CodeGen/AArch64/popcount.ll
index fc71ed0ab508..105969717e46 100644
--- a/llvm/test/CodeGen/AArch64/popcount.ll
+++ b/llvm/test/CodeGen/AArch64/popcount.ll
@@ -1,18 +1,20 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-; RUN: llc < %s -mtriple=aarch64-unknown-unknown | FileCheck %s
+; RUN: llc < %s -O0 -mtriple=aarch64-unknown-unknown | FileCheck %s
; Function Attrs: nobuiltin nounwind readonly
define i8 @popcount128(i128* nocapture nonnull readonly %0) {
; CHECK-LABEL: popcount128:
; CHECK: // %bb.0: // %Entry
-; CHECK-NEXT: ldp d1, d0, [x0]
-; CHECK-NEXT: cnt v0.8b, v0.8b
-; CHECK-NEXT: cnt v1.8b, v1.8b
-; CHECK-NEXT: uaddlv h0, v0.8b
-; CHECK-NEXT: uaddlv h1, v1.8b
-; CHECK-NEXT: fmov w8, s0
-; CHECK-NEXT: fmov w9, s1
-; CHECK-NEXT: add w0, w9, w8
+; CHECK-NEXT: ldr x8, [x0, #8]
+; CHECK-NEXT: ldr d0, [x0]
+; CHECK-NEXT: // implicit-def: $q1
+; CHECK-NEXT: mov v1.16b, v0.16b
+; CHECK-NEXT: mov v1.d[1], x8
+; CHECK-NEXT: cnt v0.16b, v1.16b
+; CHECK-NEXT: uaddlv h0, v0.16b
+; CHECK-NEXT: // implicit-def: $q1
+; CHECK-NEXT: mov v1.16b, v0.16b
+; CHECK-NEXT: fmov w0, s1
; CHECK-NEXT: ret
Entry:
%1 = load i128, i128* %0, align 16
@@ -28,23 +30,27 @@ declare i128 @llvm.ctpop.i128(i128)
define i16 @popcount256(i256* nocapture nonnull readonly %0) {
; CHECK-LABEL: popcount256:
; CHECK: // %bb.0: // %Entry
-; CHECK-NEXT: ldp d1, d0, [x0, #16]
-; CHECK-NEXT: ldp d3, d2, [x0]
-; CHECK-NEXT: cnt v0.8b, v0.8b
-; CHECK-NEXT: cnt v1.8b, v1.8b
-; CHECK-NEXT: uaddlv h0, v0.8b
-; CHECK-NEXT: cnt v2.8b, v2.8b
-; CHECK-NEXT: uaddlv h1, v1.8b
-; CHECK-NEXT: fmov w8, s0
-; CHECK-NEXT: cnt v0.8b, v3.8b
-; CHECK-NEXT: uaddlv h2, v2.8b
+; CHECK-NEXT: ldr x8, [x0, #8]
+; CHECK-NEXT: ldr x9, [x0, #24]
+; CHECK-NEXT: ldr d0, [x0, #16]
+; CHECK-NEXT: // implicit-def: $q1
+; CHECK-NEXT: mov v1.16b, v0.16b
+; CHECK-NEXT: mov v1.d[1], x9
+; CHECK-NEXT: cnt v0.16b, v1.16b
+; CHECK-NEXT: uaddlv h0, v0.16b
+; CHECK-NEXT: // implicit-def: $q1
+; CHECK-NEXT: mov v1.16b, v0.16b
; CHECK-NEXT: fmov w9, s1
-; CHECK-NEXT: uaddlv h0, v0.8b
-; CHECK-NEXT: fmov w10, s2
-; CHECK-NEXT: add w8, w9, w8
-; CHECK-NEXT: fmov w9, s0
-; CHECK-NEXT: add w9, w9, w10
-; CHECK-NEXT: add w0, w9, w8
+; CHECK-NEXT: ldr d0, [x0]
+; CHECK-NEXT: // implicit-def: $q1
+; CHECK-NEXT: mov v1.16b, v0.16b
+; CHECK-NEXT: mov v1.d[1], x8
+; CHECK-NEXT: cnt v0.16b, v1.16b
+; CHECK-NEXT: uaddlv h0, v0.16b
+; CHECK-NEXT: // implicit-def: $q1
+; CHECK-NEXT: mov v1.16b, v0.16b
+; CHECK-NEXT: fmov w8, s1
+; CHECK-NEXT: add w0, w8, w9
; CHECK-NEXT: ret
Entry:
%1 = load i256, i256* %0, align 16
@@ -59,17 +65,17 @@ declare i256 @llvm.ctpop.i256(i256)
define <1 x i128> @popcount1x128(<1 x i128> %0) {
; CHECK-LABEL: popcount1x128:
; CHECK: // %bb.0: // %Entry
-; CHECK-NEXT: fmov d0, x1
-; CHECK-NEXT: fmov d1, x0
-; CHECK-NEXT: cnt v0.8b, v0.8b
-; CHECK-NEXT: cnt v1.8b, v1.8b
-; CHECK-NEXT: uaddlv h0, v0.8b
-; CHECK-NEXT: uaddlv h1, v1.8b
-; CHECK-NEXT: movi v2.2d, #0000000000000000
-; CHECK-NEXT: fmov w8, s0
-; CHECK-NEXT: fmov w9, s1
-; CHECK-NEXT: add x0, x9, x8
-; CHECK-NEXT: mov x1, v2.d[1]
+; CHECK-NEXT: // implicit-def: $q0
+; CHECK-NEXT: fmov d0, x0
+; CHECK-NEXT: mov v0.d[1], x1
+; CHECK-NEXT: cnt v0.16b, v0.16b
+; CHECK-NEXT: uaddlv h0, v0.16b
+; CHECK-NEXT: // implicit-def: $q1
+; CHECK-NEXT: mov v1.16b, v0.16b
+; CHECK-NEXT: fmov w0, s1
+; CHECK-NEXT: // kill: def $x0 killed $w0
+; CHECK-NEXT: movi v0.2d, #0000000000000000
+; CHECK-NEXT: mov x1, v0.d[1]
; CHECK-NEXT: ret
Entry:
%1 = tail call <1 x i128> @llvm.ctpop.v1.i128(<1 x i128> %0)
More information about the llvm-commits
mailing list