From 228dd96c6fddad6d070c29a6830c7bd161982e3a Mon Sep 17 00:00:00 2001 From: Jinsong Ji Date: Tue, 12 Nov 2019 15:00:09 +0000 Subject: [PATCH] [PowerPC] Remove allow-deprecated-dag-overlap and fix broken tests Summary: This is found during review of https://reviews.llvm.org/D67088. CHECK-DAG is non-overlapping after https://reviews.llvm.org/D47106. -allow-deprecated-dag-overlap was introduced to temporary accept old behavior. But it actually hide some broken tests, eg: `test/CodeGen/PowerPC/swaps-le-1.ll` The codegen has changed, but the CHECK-DAG still PASS due to allowing `overlap`. This patch remove the deprecated options, and fix the broken tests. Reviewers: #powerpc, hfinkel, nemanjai, steven.zhang, shchenz Reviewed By: shchenz Subscribers: shchenz, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69733 --- llvm/test/CodeGen/PowerPC/build-vector-tests.ll | 8 +++---- llvm/test/CodeGen/PowerPC/machine-combiner.ll | 6 ++--- llvm/test/CodeGen/PowerPC/memcpy-vec.ll | 8 +++---- llvm/test/CodeGen/PowerPC/swaps-le-1.ll | 32 ++++++++++++------------- llvm/test/CodeGen/PowerPC/uint-to-fp-v4i32.ll | 8 +++---- 5 files changed, 31 insertions(+), 31 deletions(-) diff --git a/llvm/test/CodeGen/PowerPC/build-vector-tests.ll b/llvm/test/CodeGen/PowerPC/build-vector-tests.ll index 8f6f783..4e096b1 100644 --- a/llvm/test/CodeGen/PowerPC/build-vector-tests.ll +++ b/llvm/test/CodeGen/PowerPC/build-vector-tests.ll @@ -1,15 +1,15 @@ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: llc -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \ -; RUN: -mtriple=powerpc64-unknown-unknown < %s | FileCheck -allow-deprecated-dag-overlap %s \ +; RUN: -mtriple=powerpc64-unknown-unknown < %s | FileCheck %s \ ; RUN: -check-prefix=P9BE -implicit-check-not frsp ; RUN: llc -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \ -; RUN: -mtriple=powerpc64le-unknown-unknown < %s | FileCheck -allow-deprecated-dag-overlap %s \ +; RUN: -mtriple=powerpc64le-unknown-unknown < %s | FileCheck %s \ ; RUN: -check-prefix=P9LE -implicit-check-not frsp ; RUN: llc -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \ -; RUN: -mtriple=powerpc64-unknown-unknown < %s | FileCheck -allow-deprecated-dag-overlap %s \ +; RUN: -mtriple=powerpc64-unknown-unknown < %s | FileCheck %s \ ; RUN: -check-prefix=P8BE -implicit-check-not frsp ; RUN: llc -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \ -; RUN: -mtriple=powerpc64le-unknown-unknown < %s | FileCheck -allow-deprecated-dag-overlap %s \ +; RUN: -mtriple=powerpc64le-unknown-unknown < %s | FileCheck %s \ ; RUN: -check-prefix=P8LE -implicit-check-not frsp ; This test case comes from the following C test case (included as it may be diff --git a/llvm/test/CodeGen/PowerPC/machine-combiner.ll b/llvm/test/CodeGen/PowerPC/machine-combiner.ll index 86439bb..47df892 100644 --- a/llvm/test/CodeGen/PowerPC/machine-combiner.ll +++ b/llvm/test/CodeGen/PowerPC/machine-combiner.ll @@ -1,5 +1,5 @@ -; RUN: llc -verify-machineinstrs -O3 -mcpu=pwr7 -enable-unsafe-fp-math < %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix=CHECK -check-prefix=CHECK-PWR -; RUN: llc -verify-machineinstrs -O3 -mcpu=a2q -enable-unsafe-fp-math < %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix=CHECK -check-prefix=CHECK-QPX +; RUN: llc -verify-machineinstrs -O3 -mcpu=pwr7 -enable-unsafe-fp-math < %s | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-PWR +; RUN: llc -verify-machineinstrs -O3 -mcpu=a2q -enable-unsafe-fp-math < %s | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-QPX target datalayout = "E-m:e-i64:64-n32:64" target triple = "powerpc64-unknown-linux-gnu" @@ -71,7 +71,7 @@ define float @reassociate_adds5(float %x0, float %x1, float %x2, float %x3, floa ; CHECK-DAG: fadds [[REG12:[0-9]+]], 5, 6 ; CHECK-DAG: fadds [[REG0:[0-9]+]], 1, 2 ; CHECK-DAG: fadds [[REG11:[0-9]+]], 3, 4 -; CHECK: fadds [[REG13:[0-9]+]], [[REG12]], 7 +; CHECK-DAG: fadds [[REG13:[0-9]+]], [[REG12]], 7 ; CHECK-DAG: fadds [[REG1:[0-9]+]], [[REG0]], [[REG11]] ; CHECK-DAG: fadds [[REG2:[0-9]+]], [[REG1]], [[REG13]] ; CHECK: fadds 1, [[REG2]], 8 diff --git a/llvm/test/CodeGen/PowerPC/memcpy-vec.ll b/llvm/test/CodeGen/PowerPC/memcpy-vec.ll index 70c1c46..cd0abd6 100644 --- a/llvm/test/CodeGen/PowerPC/memcpy-vec.ll +++ b/llvm/test/CodeGen/PowerPC/memcpy-vec.ll @@ -1,6 +1,6 @@ -; RUN: llc -verify-machineinstrs -mcpu=pwr7 < %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix=PWR7 -; RUN: llc -verify-machineinstrs -mcpu=pwr8 < %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix=PWR8 -; RUN: llc -verify-machineinstrs -mcpu=a2q < %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix=A2Q +; RUN: llc -verify-machineinstrs -mcpu=pwr7 < %s | FileCheck %s -check-prefix=PWR7 +; RUN: llc -verify-machineinstrs -mcpu=pwr8 < %s | FileCheck %s -check-prefix=PWR8 +; RUN: llc -verify-machineinstrs -mcpu=a2q < %s | FileCheck %s -check-prefix=A2Q target datalayout = "E-m:e-i64:64-n32:64" target triple = "powerpc64-unknown-linux-gnu" @@ -16,7 +16,7 @@ entry: ; PWR7-NOT: bl memcpy ; PWR7-DAG: li [[OFFSET:[0-9]+]], 16 ; PWR7-DAG: lxvd2x [[TMP0:[0-9]+]], 4, [[OFFSET]] -; PWR7-DAG: stxvd2x [[TMP0]], 0, 3 +; PWR7-DAG: stxvd2x [[TMP0]], 3, [[OFFSET]] ; PWR7-DAG: lxvd2x [[TMP1:[0-9]+]], 0, 4 ; PWR7-DAG: stxvd2x [[TMP1]], 0, 3 ; PWR7: blr diff --git a/llvm/test/CodeGen/PowerPC/swaps-le-1.ll b/llvm/test/CodeGen/PowerPC/swaps-le-1.ll index 2855287..7949dece 100644 --- a/llvm/test/CodeGen/PowerPC/swaps-le-1.ll +++ b/llvm/test/CodeGen/PowerPC/swaps-le-1.ll @@ -1,17 +1,17 @@ ; RUN: llc -verify-machineinstrs -O3 -mcpu=pwr8 \ -; RUN: -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck -allow-deprecated-dag-overlap %s +; RUN: -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s ; RUN: llc -verify-machineinstrs -O3 -mcpu=pwr8 -disable-ppc-vsx-swap-removal \ -; RUN: -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck -allow-deprecated-dag-overlap \ +; RUN: -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck \ ; RUN: -check-prefix=NOOPTSWAP %s ; RUN: llc -O3 -mcpu=pwr9 -mtriple=powerpc64le-unknown-linux-gnu \ -; RUN: -verify-machineinstrs -ppc-vsr-nums-as-vr < %s | FileCheck -allow-deprecated-dag-overlap \ +; RUN: -verify-machineinstrs -ppc-vsr-nums-as-vr < %s | FileCheck \ ; RUN: -check-prefix=CHECK-P9 --implicit-check-not xxswapd %s ; RUN: llc -O3 -mcpu=pwr9 -disable-ppc-vsx-swap-removal -mattr=-power9-vector \ ; RUN: -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu < %s \ -; RUN: | FileCheck -allow-deprecated-dag-overlap -check-prefix=NOOPTSWAP %s +; RUN: | FileCheck -check-prefix=NOOPTSWAP %s ; LH: 2016-11-17 ; Updated align attritue from 16 to 8 to keep swap instructions tests. @@ -167,15 +167,15 @@ for.end: ; CHECK-P9-DAG: lxvx ; CHECK-P9-DAG: lxvx ; CHECK-P9-DAG: lxvx -; CHECK-P9-DAG: lxvx -; CHECK-P9-DAG: lxvx -; CHECK-P9-DAG: lxvx -; CHECK-P9-DAG: lxvx -; CHECK-P9-DAG: lxvx -; CHECK-P9-DAG: lxvx -; CHECK-P9-DAG: lxvx -; CHECK-P9-DAG: lxvx -; CHECK-P9-DAG: lxvx +; CHECK-P9-DAG: lxv +; CHECK-P9-DAG: lxv +; CHECK-P9-DAG: lxv +; CHECK-P9-DAG: lxv +; CHECK-P9-DAG: lxv +; CHECK-P9-DAG: lxv +; CHECK-P9-DAG: lxv +; CHECK-P9-DAG: lxv +; CHECK-P9-DAG: lxv ; CHECK-P9-DAG: vadduwm ; CHECK-P9-DAG: vadduwm ; CHECK-P9-DAG: vadduwm @@ -185,7 +185,7 @@ for.end: ; CHECK-P9-DAG: vmuluwm ; CHECK-P9-DAG: vmuluwm ; CHECK-P9-DAG: stxvx -; CHECK-P9-DAG: stxvx -; CHECK-P9-DAG: stxvx -; CHECK-P9-DAG: stxvx +; CHECK-P9-DAG: stxv +; CHECK-P9-DAG: stxv +; CHECK-P9-DAG: stxv diff --git a/llvm/test/CodeGen/PowerPC/uint-to-fp-v4i32.ll b/llvm/test/CodeGen/PowerPC/uint-to-fp-v4i32.ll index 08e663c..4afd0e2 100644 --- a/llvm/test/CodeGen/PowerPC/uint-to-fp-v4i32.ll +++ b/llvm/test/CodeGen/PowerPC/uint-to-fp-v4i32.ll @@ -1,15 +1,15 @@ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: llc -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \ -; RUN: -mtriple=powerpc64-unknown-unknown < %s | FileCheck -allow-deprecated-dag-overlap %s \ +; RUN: -mtriple=powerpc64-unknown-unknown < %s | FileCheck %s \ ; RUN: -check-prefix=P9BE ; RUN: llc -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \ -; RUN: -mtriple=powerpc64le-unknown-unknown < %s | FileCheck -allow-deprecated-dag-overlap %s \ +; RUN: -mtriple=powerpc64le-unknown-unknown < %s | FileCheck %s \ ; RUN: -check-prefix=P9LE ; RUN: llc -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \ -; RUN: -mtriple=powerpc64-unknown-unknown < %s | FileCheck -allow-deprecated-dag-overlap %s \ +; RUN: -mtriple=powerpc64-unknown-unknown < %s | FileCheck %s \ ; RUN: -check-prefix=P8BE ; RUN: llc -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \ -; RUN: -mtriple=powerpc64le-unknown-unknown < %s | FileCheck -allow-deprecated-dag-overlap %s \ +; RUN: -mtriple=powerpc64le-unknown-unknown < %s | FileCheck %s \ ; RUN: -check-prefix=P8LE define dso_local <2 x double> @test1(<8 x i16> %a) { ; P9BE-LABEL: test1: -- 2.7.4