[llvm] 0f10850 - [CodeGen] Add machine verification to some tests

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 24 03:04:40 PDT 2023


Author: Jay Foad
Date: 2023-07-24T11:04:10+01:00
New Revision: 0f10850e51fa9c82bb44a9d9009b5cf7b3022ac1

URL: https://github.com/llvm/llvm-project/commit/0f10850e51fa9c82bb44a9d9009b5cf7b3022ac1
DIFF: https://github.com/llvm/llvm-project/commit/0f10850e51fa9c82bb44a9d9009b5cf7b3022ac1.diff

LOG: [CodeGen] Add machine verification to some tests

This is to catch errors in an upcoming patch.

Added: 
    

Modified: 
    llvm/test/CodeGen/AVR/stdwstk.ll
    llvm/test/CodeGen/M68k/Atomics/rmw.ll
    llvm/test/CodeGen/X86/half.ll
    llvm/test/CodeGen/X86/ldexp.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/AVR/stdwstk.ll b/llvm/test/CodeGen/AVR/stdwstk.ll
index 61b02235f2e49b..51e5c115f16a3e 100644
--- a/llvm/test/CodeGen/AVR/stdwstk.ll
+++ b/llvm/test/CodeGen/AVR/stdwstk.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=avr -mcpu=atmega328 -O1 | FileCheck %s
+; RUN: llc < %s -march=avr -mcpu=atmega328 -O1 -verify-machineinstrs | FileCheck %s
 ; CHECK-NOT: stdwstk
 
 ; Checks that we expand STDWSPQRr always - even if it appears outside of the

diff  --git a/llvm/test/CodeGen/M68k/Atomics/rmw.ll b/llvm/test/CodeGen/M68k/Atomics/rmw.ll
index e9c19a1ad5e6eb..b589e7751d80e7 100644
--- a/llvm/test/CodeGen/M68k/Atomics/rmw.ll
+++ b/llvm/test/CodeGen/M68k/Atomics/rmw.ll
@@ -1,9 +1,9 @@
 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-; RUN: llc %s -o - -mtriple=m68k -mcpu=M68000 | FileCheck %s --check-prefix=NO-ATOMIC
-; RUN: llc %s -o - -mtriple=m68k -mcpu=M68010 | FileCheck %s --check-prefix=NO-ATOMIC
-; RUN: llc %s -o - -mtriple=m68k -mcpu=M68020 | FileCheck %s --check-prefix=ATOMIC
-; RUN: llc %s -o - -mtriple=m68k -mcpu=M68030 | FileCheck %s --check-prefix=ATOMIC
-; RUN: llc %s -o - -mtriple=m68k -mcpu=M68040 | FileCheck %s --check-prefix=ATOMIC
+; RUN: llc %s -o - -mtriple=m68k -mcpu=M68000 -verify-machineinstrs | FileCheck %s --check-prefix=NO-ATOMIC
+; RUN: llc %s -o - -mtriple=m68k -mcpu=M68010 -verify-machineinstrs | FileCheck %s --check-prefix=NO-ATOMIC
+; RUN: llc %s -o - -mtriple=m68k -mcpu=M68020 -verify-machineinstrs | FileCheck %s --check-prefix=ATOMIC
+; RUN: llc %s -o - -mtriple=m68k -mcpu=M68030 -verify-machineinstrs | FileCheck %s --check-prefix=ATOMIC
+; RUN: llc %s -o - -mtriple=m68k -mcpu=M68040 -verify-machineinstrs | FileCheck %s --check-prefix=ATOMIC
 
 define i8 @atomicrmw_add_i8(i8 %val, ptr %ptr) {
 ; NO-ATOMIC-LABEL: atomicrmw_add_i8:

diff  --git a/llvm/test/CodeGen/X86/half.ll b/llvm/test/CodeGen/X86/half.ll
index 6584a5f418ca2f..596e465ee8cacf 100644
--- a/llvm/test/CodeGen/X86/half.ll
+++ b/llvm/test/CodeGen/X86/half.ll
@@ -1,11 +1,11 @@
 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mattr=-f16c -fixup-byte-word-insts=1 \
+; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mattr=-f16c -fixup-byte-word-insts=1 -verify-machineinstrs \
 ; RUN:   | FileCheck %s -check-prefixes=CHECK,CHECK-LIBCALL,BWON
-; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mattr=-f16c  -fixup-byte-word-insts=0 \
+; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mattr=-f16c  -fixup-byte-word-insts=0 -verify-machineinstrs \
 ; RUN:   | FileCheck %s -check-prefixes=CHECK,CHECK-LIBCALL,BWOFF
-; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mattr=+f16c -fixup-byte-word-insts=1 \
+; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mattr=+f16c -fixup-byte-word-insts=1 -verify-machineinstrs \
 ; RUN:    | FileCheck %s -check-prefixes=CHECK,BWON,BWON-F16C
-; RUN: llc < %s -mtriple=i686-unknown-linux-gnu -mattr +sse2 -fixup-byte-word-insts=0  \
+; RUN: llc < %s -mtriple=i686-unknown-linux-gnu -mattr +sse2 -fixup-byte-word-insts=0 -verify-machineinstrs \
 ; RUN:    | FileCheck %s -check-prefixes=CHECK-I686
 
 define void @test_load_store(ptr %in, ptr %out) #0 {

diff  --git a/llvm/test/CodeGen/X86/ldexp.ll b/llvm/test/CodeGen/X86/ldexp.ll
index 21062e35fd13a2..44c57c54ba0233 100644
--- a/llvm/test/CodeGen/X86/ldexp.ll
+++ b/llvm/test/CodeGen/X86/ldexp.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
-; RUN: llc -mtriple=x86_64-unknown-unknown < %s | FileCheck -check-prefixes=X64 %s
-; RUN: llc -mtriple=i386-pc-win32 < %s | FileCheck -check-prefix=WIN32 %s
+; RUN: llc -mtriple=x86_64-unknown-unknown -verify-machineinstrs < %s | FileCheck -check-prefixes=X64 %s
+; RUN: llc -mtriple=i386-pc-win32 -verify-machineinstrs < %s | FileCheck -check-prefix=WIN32 %s
 
 define float @ldexp_f32(i8 zeroext %x) {
 ; X64-LABEL: ldexp_f32:


        


More information about the llvm-commits mailing list