[llvm] 4e681fa - [X86][GlobalISel] Enable a test case for sext i32->i64 that was commented out.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 9 12:01:53 PDT 2020


Author: Craig Topper
Date: 2020-08-09T12:01:34-07:00
New Revision: 4e681fad46868c1c68a5ff9193447eb245824ca1

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

LOG: [X86][GlobalISel] Enable a test case for sext i32->i64 that was commented out.

Test case seems to work so I guess whatever lead to it being
commented out with a FIXME has been fixed.

Added: 
    

Modified: 
    llvm/test/CodeGen/X86/GlobalISel/ext-x86-64.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/X86/GlobalISel/ext-x86-64.ll b/llvm/test/CodeGen/X86/GlobalISel/ext-x86-64.ll
index 26ee839b614e..ae25eeac37c7 100644
--- a/llvm/test/CodeGen/X86/GlobalISel/ext-x86-64.ll
+++ b/llvm/test/CodeGen/X86/GlobalISel/ext-x86-64.ll
@@ -1,5 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-; RUN: llc -mtriple=x86_64-linux-gnu    -global-isel -verify-machineinstrs < %s -o - | FileCheck %s --check-prefix=X64
+; RUN: llc -mtriple=x86_64-linux-gnu    -global-isel -verify-machineinstrs -global-isel-abort=2 < %s -o - | FileCheck %s --check-prefix=X64
 
 ; TODO merge with ext.ll after i64 sext supported on 32bit platform
 
@@ -36,11 +36,14 @@ define i64 @test_sext_i16(i16 %val) {
   ret i64 %r
 }
 
-; TODO enable after selection supported
-;define i64 @test_sext_i32(i32 %val) {
-;  %r = sext i32 %val to i64
-;  ret i64 %r
-;}
+define i64 @test_sext_i32(i32 %val) {
+; X64-LABEL: test_sext_i32:
+; X64:       # %bb.0:
+; X64-NEXT:    movslq %edi, %rax
+; X64-NEXT:    retq
+  %r = sext i32 %val to i64
+  ret i64 %r
+}
 
 define i64 @test_zext_i8_to_i64(i8 %x, i8 %y) {
 ; X64-LABEL: test_zext_i8_to_i64:


        


More information about the llvm-commits mailing list