[llvm] f36f0f2 - [x86] add tests for fixup-bw with size optimization attrs; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 19 13:45:08 PDT 2022


Author: Sanjay Patel
Date: 2022-07-19T16:43:47-04:00
New Revision: f36f0f23c430c9b049b98761b425ddb184a1e1d8

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

LOG: [x86] add tests for fixup-bw with size optimization attrs; NFC

Added: 
    

Modified: 
    llvm/test/CodeGen/X86/fixup-bw-copy.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/X86/fixup-bw-copy.ll b/llvm/test/CodeGen/X86/fixup-bw-copy.ll
index 88a2af92ed7ff..f73b0c840c1f7 100644
--- a/llvm/test/CodeGen/X86/fixup-bw-copy.ll
+++ b/llvm/test/CodeGen/X86/fixup-bw-copy.ll
@@ -6,7 +6,7 @@
 
 target datalayout = "e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128"
 
-define i8 @test_movb(i8 %a0) {
+define i8 @test_movb(i8 %a0) nounwind {
 ; X64-LABEL: test_movb:
 ; X64:       # %bb.0:
 ; X64-NEXT:    movl %edi, %eax
@@ -20,6 +20,34 @@ define i8 @test_movb(i8 %a0) {
   ret i8 %a0
 }
 
+define i8 @test_movb_Os(i8 %a0) nounwind optsize {
+; X64-LABEL: test_movb_Os:
+; X64:       # %bb.0:
+; X64-NEXT:    movl %edi, %eax
+; X64-NEXT:    # kill: def $al killed $al killed $eax
+; X64-NEXT:    retq
+;
+; X32-LABEL: test_movb_Os:
+; X32:       # %bb.0:
+; X32-NEXT:    movb {{[0-9]+}}(%esp), %al
+; X32-NEXT:    retl
+  ret i8 %a0
+}
+
+define i8 @test_movb_Oz(i8 %a0) nounwind minsize {
+; X64-LABEL: test_movb_Oz:
+; X64:       # %bb.0:
+; X64-NEXT:    movl %edi, %eax
+; X64-NEXT:    # kill: def $al killed $al killed $eax
+; X64-NEXT:    retq
+;
+; X32-LABEL: test_movb_Oz:
+; X32:       # %bb.0:
+; X32-NEXT:    movb {{[0-9]+}}(%esp), %al
+; X32-NEXT:    retl
+  ret i8 %a0
+}
+
 define i16 @test_movw(i16 %a0) {
 ; X64-LABEL: test_movw:
 ; X64:       # %bb.0:


        


More information about the llvm-commits mailing list