As Dan pointed out, movzbl, movsbl, and friends are nicer than their alias
authorBill Wendling <isanbard@gmail.com>
Thu, 14 Apr 2011 01:46:37 +0000 (01:46 +0000)
committerBill Wendling <isanbard@gmail.com>
Thu, 14 Apr 2011 01:46:37 +0000 (01:46 +0000)
(movzx/movsx) because they give more information. Revert that part of the patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129498 91177308-0d34-0410-b5e6-96231b3b80d8

29 files changed:
lib/Target/X86/X86InstrInfo.td
test/CodeGen/X86/2006-11-17-IllegalMove.ll
test/CodeGen/X86/2007-08-10-SignExtSubreg.ll
test/CodeGen/X86/2008-08-17-UComiCodeGenBug.ll
test/CodeGen/X86/2009-06-05-VZextByteShort.ll
test/CodeGen/X86/anyext.ll
test/CodeGen/X86/avx-intrinsics-x86.ll
test/CodeGen/X86/bool-zext.ll
test/CodeGen/X86/cmov.ll
test/CodeGen/X86/cmp.ll
test/CodeGen/X86/fast-isel-gep.ll
test/CodeGen/X86/h-register-addressing-32.ll
test/CodeGen/X86/h-registers-0.ll
test/CodeGen/X86/h-registers-2.ll
test/CodeGen/X86/inline-asm-mrv.ll
test/CodeGen/X86/masked-iv-unsafe.ll
test/CodeGen/X86/pr3366.ll
test/CodeGen/X86/promote-assert-zext.ll
test/CodeGen/X86/promote-i16.ll
test/CodeGen/X86/select.ll
test/CodeGen/X86/setcc.ll
test/CodeGen/X86/sext-ret-val.ll
test/CodeGen/X86/sext-subreg.ll
test/CodeGen/X86/shl_elim.ll
test/CodeGen/X86/umul-with-overflow.ll
test/CodeGen/X86/vshift-4.ll
test/CodeGen/X86/widen_conv-2.ll
test/CodeGen/X86/x86-64-shortint.ll
test/MC/X86/x86-64.s

index 177a2794a3854d2f434634e8c6261d681d41c4d8..549b2883a244699050aaa1ebdcac981a4e5668c9 100644 (file)
@@ -1546,21 +1546,21 @@ def : InstAlias<"movq $src, $dst",
 def : InstAlias<"movsd", (MOVSD)>;
 
 // movsx aliases
-def : InstAlias<"movsx $src, $dst", (MOVSX16rr8W GR16:$dst, GR8:$src)>;
-def : InstAlias<"movsx $src, $dst", (MOVSX16rm8W GR16:$dst, i8mem:$src)>;
-def : InstAlias<"movsx $src, $dst", (MOVSX32rr8 GR32:$dst, GR8:$src)>;
-def : InstAlias<"movsx $src, $dst", (MOVSX32rr16 GR32:$dst, GR16:$src)>;
-def : InstAlias<"movsx $src, $dst", (MOVSX64rr8 GR64:$dst, GR8:$src)>;
-def : InstAlias<"movsx $src, $dst", (MOVSX64rr16 GR64:$dst, GR16:$src)>;
-def : InstAlias<"movsx $src, $dst", (MOVSX64rr32 GR64:$dst, GR32:$src)>;
+def : InstAlias<"movsx $src, $dst", (MOVSX16rr8W GR16:$dst, GR8:$src), 0>;
+def : InstAlias<"movsx $src, $dst", (MOVSX16rm8W GR16:$dst, i8mem:$src), 0>;
+def : InstAlias<"movsx $src, $dst", (MOVSX32rr8 GR32:$dst, GR8:$src), 0>;
+def : InstAlias<"movsx $src, $dst", (MOVSX32rr16 GR32:$dst, GR16:$src), 0>;
+def : InstAlias<"movsx $src, $dst", (MOVSX64rr8 GR64:$dst, GR8:$src), 0>;
+def : InstAlias<"movsx $src, $dst", (MOVSX64rr16 GR64:$dst, GR16:$src), 0>;
+def : InstAlias<"movsx $src, $dst", (MOVSX64rr32 GR64:$dst, GR32:$src), 0>;
 
 // movzx aliases
-def : InstAlias<"movzx $src, $dst", (MOVZX16rr8W GR16:$dst, GR8:$src)>;
-def : InstAlias<"movzx $src, $dst", (MOVZX16rm8W GR16:$dst, i8mem:$src)>;
-def : InstAlias<"movzx $src, $dst", (MOVZX32rr8 GR32:$dst, GR8:$src)>;
-def : InstAlias<"movzx $src, $dst", (MOVZX32rr16 GR32:$dst, GR16:$src)>;
-def : InstAlias<"movzx $src, $dst", (MOVZX64rr8_Q GR64:$dst, GR8:$src)>;
-def : InstAlias<"movzx $src, $dst", (MOVZX64rr16_Q GR64:$dst, GR16:$src)>;
+def : InstAlias<"movzx $src, $dst", (MOVZX16rr8W GR16:$dst, GR8:$src), 0>;
+def : InstAlias<"movzx $src, $dst", (MOVZX16rm8W GR16:$dst, i8mem:$src), 0>;
+def : InstAlias<"movzx $src, $dst", (MOVZX32rr8 GR32:$dst, GR8:$src), 0>;
+def : InstAlias<"movzx $src, $dst", (MOVZX32rr16 GR32:$dst, GR16:$src), 0>;
+def : InstAlias<"movzx $src, $dst", (MOVZX64rr8_Q GR64:$dst, GR8:$src), 0>;
+def : InstAlias<"movzx $src, $dst", (MOVZX64rr16_Q GR64:$dst, GR16:$src), 0>;
 // Note: No GR32->GR64 movzx form.
 
 // outb %dx -> outb %al, %dx
index 091a340b8ab591fc02799d32cf5078cbce5e800d..affb7afb1c519f7783df5643fa8aed264a5b3e72 100644 (file)
@@ -1,6 +1,6 @@
 ; RUN: llc < %s -march=x86-64 > %t
 ; RUN: grep movb %t | count 2
-; RUN: grep {movzx} %t
+; RUN: grep {movzb\[wl\]} %t
 
 
 define void @handle_vector_size_attribute() nounwind {
index a492f8d37fd1444a4afb94361a6c21a5325ca220..e93092f355c5c466614cf48f7a2cbf0818336ae9 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86 | grep {movsx}
+; RUN: llc < %s -march=x86 | grep {movsbl}
 
 @X = global i32 0               ; <i32*> [#uses=1]
 
index 9cc05262e0d2e7fda6915fa71f1f732aaadc95ab..32f6ca0ce086bd9ca48e7650a3915edd0129ebb0 100644 (file)
@@ -1,10 +1,9 @@
-; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-apple-darwin | grep movzbl
 
 define i32 @foo(<4 x float> %a, <4 x float> %b) nounwind {
 entry:
-; CHECK: movzx
-  tail call i32 @llvm.x86.sse.ucomige.ss( <4 x float> %a, <4 x float> %b ) nounwind readnone
-  ret i32 %0
+       tail call i32 @llvm.x86.sse.ucomige.ss( <4 x float> %a, <4 x float> %b ) nounwind readnone
+       ret i32 %0
 }
 
 declare i32 @llvm.x86.sse.ucomige.ss(<4 x float>, <4 x float>) nounwind readnone
index 1d29fea30d7de9eb141049f5526b52193ab28e59..5c514805e485c009b23963860854e26019a7aeda 100644 (file)
@@ -1,8 +1,9 @@
-; RUN: llc < %s -march=x86 -mattr=+mmx,+sse2 | FileCheck %s
+; RUN: llc < %s -march=x86 -mattr=+mmx,+sse2 > %t1
+; RUN: grep movzwl %t1 | count 2
+; RUN: grep movzbl %t1 | count 2
+; RUN: grep movd %t1 | count 4
 
 define <4 x i16> @a(i32* %x1) nounwind {
-; CHECK:      movzx
-; CHECK-NEXT: movd
   %x2 = load i32* %x1
   %x3 = lshr i32 %x2, 1
   %x = trunc i32 %x3 to i16
@@ -11,8 +12,6 @@ define <4 x i16> @a(i32* %x1) nounwind {
 }
 
 define <8 x i16> @b(i32* %x1) nounwind {
-; CHECK:      movzx
-; CHECK-NEXT: movd
   %x2 = load i32* %x1
   %x3 = lshr i32 %x2, 1
   %x = trunc i32 %x3 to i16
@@ -21,8 +20,6 @@ define <8 x i16> @b(i32* %x1) nounwind {
 }
 
 define <8 x i8> @c(i32* %x1) nounwind {
-; CHECK:      movzx
-; CHECK-NEXT: movd
   %x2 = load i32* %x1
   %x3 = lshr i32 %x2, 1
   %x = trunc i32 %x3 to i8
@@ -31,8 +28,6 @@ define <8 x i8> @c(i32* %x1) nounwind {
 }
 
 define <16 x i8> @d(i32* %x1) nounwind {
-; CHECK:      movzx
-; CHECK-NEXT: movd
   %x2 = load i32* %x1
   %x3 = lshr i32 %x2, 1
   %x = trunc i32 %x3 to i8
index 32a48fbedca29911c67ee202f65347a523323ead..106fe83661b413c3302f0eb40c20af3cf593f519 100644 (file)
@@ -1,10 +1,8 @@
-; RUN: llc < %s -march=x86-64 | FileCheck %s
+; RUN: llc < %s -march=x86-64 | grep movzbl | count 2
 
-; Use movzbl (aliased as movzx) to avoid partial-register updates.
+; Use movzbl to avoid partial-register updates.
 
 define i32 @foo(i32 %p, i8 zeroext %x) nounwind {
-; CHECK: movzx %dil, %eax
-; CHECK: movzx %al, %eax
   %q = trunc i32 %p to i8
   %r = udiv i8 %q, %x
   %s = zext i8 %r to i32
index 051be285e174fd71eab67155754e699dda6323c5..5201688686d3b5c5f544b63c05854e86148617cc 100644 (file)
@@ -75,7 +75,7 @@ declare <2 x double> @llvm.x86.sse2.cmp.sd(<2 x double>, <2 x double>, i8) nounw
 define i32 @test_x86_sse2_comieq_sd(<2 x double> %a0, <2 x double> %a1) {
   ; CHECK: vcomisd
   ; CHECK: sete
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.sse2.comieq.sd(<2 x double> %a0, <2 x double> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -85,7 +85,7 @@ declare i32 @llvm.x86.sse2.comieq.sd(<2 x double>, <2 x double>) nounwind readno
 define i32 @test_x86_sse2_comige_sd(<2 x double> %a0, <2 x double> %a1) {
   ; CHECK: vcomisd
   ; CHECK: setae
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.sse2.comige.sd(<2 x double> %a0, <2 x double> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -95,7 +95,7 @@ declare i32 @llvm.x86.sse2.comige.sd(<2 x double>, <2 x double>) nounwind readno
 define i32 @test_x86_sse2_comigt_sd(<2 x double> %a0, <2 x double> %a1) {
   ; CHECK: vcomisd
   ; CHECK: seta
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.sse2.comigt.sd(<2 x double> %a0, <2 x double> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -105,7 +105,7 @@ declare i32 @llvm.x86.sse2.comigt.sd(<2 x double>, <2 x double>) nounwind readno
 define i32 @test_x86_sse2_comile_sd(<2 x double> %a0, <2 x double> %a1) {
   ; CHECK: vcomisd
   ; CHECK: setbe
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.sse2.comile.sd(<2 x double> %a0, <2 x double> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -125,7 +125,7 @@ declare i32 @llvm.x86.sse2.comilt.sd(<2 x double>, <2 x double>) nounwind readno
 define i32 @test_x86_sse2_comineq_sd(<2 x double> %a0, <2 x double> %a1) {
   ; CHECK: vcomisd
   ; CHECK: setne
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.sse2.comineq.sd(<2 x double> %a0, <2 x double> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -786,7 +786,7 @@ declare <2 x double> @llvm.x86.sse2.sub.sd(<2 x double>, <2 x double>) nounwind
 define i32 @test_x86_sse2_ucomieq_sd(<2 x double> %a0, <2 x double> %a1) {
   ; CHECK: vucomisd
   ; CHECK: sete
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.sse2.ucomieq.sd(<2 x double> %a0, <2 x double> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -796,7 +796,7 @@ declare i32 @llvm.x86.sse2.ucomieq.sd(<2 x double>, <2 x double>) nounwind readn
 define i32 @test_x86_sse2_ucomige_sd(<2 x double> %a0, <2 x double> %a1) {
   ; CHECK: vucomisd
   ; CHECK: setae
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.sse2.ucomige.sd(<2 x double> %a0, <2 x double> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -806,7 +806,7 @@ declare i32 @llvm.x86.sse2.ucomige.sd(<2 x double>, <2 x double>) nounwind readn
 define i32 @test_x86_sse2_ucomigt_sd(<2 x double> %a0, <2 x double> %a1) {
   ; CHECK: vucomisd
   ; CHECK: seta
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.sse2.ucomigt.sd(<2 x double> %a0, <2 x double> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -816,7 +816,7 @@ declare i32 @llvm.x86.sse2.ucomigt.sd(<2 x double>, <2 x double>) nounwind readn
 define i32 @test_x86_sse2_ucomile_sd(<2 x double> %a0, <2 x double> %a1) {
   ; CHECK: vucomisd
   ; CHECK: setbe
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.sse2.ucomile.sd(<2 x double> %a0, <2 x double> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -835,7 +835,7 @@ declare i32 @llvm.x86.sse2.ucomilt.sd(<2 x double>, <2 x double>) nounwind readn
 define i32 @test_x86_sse2_ucomineq_sd(<2 x double> %a0, <2 x double> %a1) {
   ; CHECK: vucomisd
   ; CHECK: setne
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.sse2.ucomineq.sd(<2 x double> %a0, <2 x double> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -1192,7 +1192,7 @@ declare i32 @llvm.x86.sse41.ptestc(<4 x float>, <4 x float>) nounwind readnone
 define i32 @test_x86_sse41_ptestnzc(<4 x float> %a0, <4 x float> %a1) {
   ; CHECK: vptest 
   ; CHECK: seta
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.sse41.ptestnzc(<4 x float> %a0, <4 x float> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -1202,7 +1202,7 @@ declare i32 @llvm.x86.sse41.ptestnzc(<4 x float>, <4 x float>) nounwind readnone
 define i32 @test_x86_sse41_ptestz(<4 x float> %a0, <4 x float> %a1) {
   ; CHECK: vptest 
   ; CHECK: sete
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.sse41.ptestz(<4 x float> %a0, <4 x float> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -1414,7 +1414,7 @@ declare <4 x float> @llvm.x86.sse.cmp.ss(<4 x float>, <4 x float>, i8) nounwind
 define i32 @test_x86_sse_comieq_ss(<4 x float> %a0, <4 x float> %a1) {
   ; CHECK: vcomiss
   ; CHECK: sete
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.sse.comieq.ss(<4 x float> %a0, <4 x float> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -1424,7 +1424,7 @@ declare i32 @llvm.x86.sse.comieq.ss(<4 x float>, <4 x float>) nounwind readnone
 define i32 @test_x86_sse_comige_ss(<4 x float> %a0, <4 x float> %a1) {
   ; CHECK: vcomiss
   ; CHECK: setae
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.sse.comige.ss(<4 x float> %a0, <4 x float> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -1434,7 +1434,7 @@ declare i32 @llvm.x86.sse.comige.ss(<4 x float>, <4 x float>) nounwind readnone
 define i32 @test_x86_sse_comigt_ss(<4 x float> %a0, <4 x float> %a1) {
   ; CHECK: vcomiss
   ; CHECK: seta
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.sse.comigt.ss(<4 x float> %a0, <4 x float> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -1444,7 +1444,7 @@ declare i32 @llvm.x86.sse.comigt.ss(<4 x float>, <4 x float>) nounwind readnone
 define i32 @test_x86_sse_comile_ss(<4 x float> %a0, <4 x float> %a1) {
   ; CHECK: vcomiss
   ; CHECK: setbe
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.sse.comile.ss(<4 x float> %a0, <4 x float> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -1463,7 +1463,7 @@ declare i32 @llvm.x86.sse.comilt.ss(<4 x float>, <4 x float>) nounwind readnone
 define i32 @test_x86_sse_comineq_ss(<4 x float> %a0, <4 x float> %a1) {
   ; CHECK: vcomiss
   ; CHECK: setne
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.sse.comineq.ss(<4 x float> %a0, <4 x float> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -1655,7 +1655,7 @@ declare <4 x float> @llvm.x86.sse.sub.ss(<4 x float>, <4 x float>) nounwind read
 define i32 @test_x86_sse_ucomieq_ss(<4 x float> %a0, <4 x float> %a1) {
   ; CHECK: vucomiss
   ; CHECK: sete
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.sse.ucomieq.ss(<4 x float> %a0, <4 x float> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -1665,7 +1665,7 @@ declare i32 @llvm.x86.sse.ucomieq.ss(<4 x float>, <4 x float>) nounwind readnone
 define i32 @test_x86_sse_ucomige_ss(<4 x float> %a0, <4 x float> %a1) {
   ; CHECK: vucomiss
   ; CHECK: setae
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.sse.ucomige.ss(<4 x float> %a0, <4 x float> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -1675,7 +1675,7 @@ declare i32 @llvm.x86.sse.ucomige.ss(<4 x float>, <4 x float>) nounwind readnone
 define i32 @test_x86_sse_ucomigt_ss(<4 x float> %a0, <4 x float> %a1) {
   ; CHECK: vucomiss
   ; CHECK: seta
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.sse.ucomigt.ss(<4 x float> %a0, <4 x float> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -1685,7 +1685,7 @@ declare i32 @llvm.x86.sse.ucomigt.ss(<4 x float>, <4 x float>) nounwind readnone
 define i32 @test_x86_sse_ucomile_ss(<4 x float> %a0, <4 x float> %a1) {
   ; CHECK: vucomiss
   ; CHECK: setbe
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.sse.ucomile.ss(<4 x float> %a0, <4 x float> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -1704,7 +1704,7 @@ declare i32 @llvm.x86.sse.ucomilt.ss(<4 x float>, <4 x float>) nounwind readnone
 define i32 @test_x86_sse_ucomineq_ss(<4 x float> %a0, <4 x float> %a1) {
   ; CHECK: vucomiss
   ; CHECK: setne
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.sse.ucomineq.ss(<4 x float> %a0, <4 x float> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -2179,7 +2179,7 @@ declare i32 @llvm.x86.avx.ptestc.256(<4 x i64>, <4 x i64>) nounwind readnone
 define i32 @test_x86_avx_ptestnzc_256(<4 x i64> %a0, <4 x i64> %a1) {
   ; CHECK: vptest
   ; CHECK: seta
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.avx.ptestnzc.256(<4 x i64> %a0, <4 x i64> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -2189,7 +2189,7 @@ declare i32 @llvm.x86.avx.ptestnzc.256(<4 x i64>, <4 x i64>) nounwind readnone
 define i32 @test_x86_avx_ptestz_256(<4 x i64> %a0, <4 x i64> %a1) {
   ; CHECK: vptest
   ; CHECK: sete
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.avx.ptestz.256(<4 x i64> %a0, <4 x i64> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -2483,7 +2483,7 @@ declare i32 @llvm.x86.avx.vtestc.ps.256(<8 x float>, <8 x float>) nounwind readn
 define i32 @test_x86_avx_vtestnzc_pd(<2 x double> %a0, <2 x double> %a1) {
   ; CHECK: vtestpd
   ; CHECK: seta
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.avx.vtestnzc.pd(<2 x double> %a0, <2 x double> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -2493,7 +2493,7 @@ declare i32 @llvm.x86.avx.vtestnzc.pd(<2 x double>, <2 x double>) nounwind readn
 define i32 @test_x86_avx_vtestnzc_pd_256(<4 x double> %a0, <4 x double> %a1) {
   ; CHECK: vtestpd
   ; CHECK: seta
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.avx.vtestnzc.pd.256(<4 x double> %a0, <4 x double> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -2503,7 +2503,7 @@ declare i32 @llvm.x86.avx.vtestnzc.pd.256(<4 x double>, <4 x double>) nounwind r
 define i32 @test_x86_avx_vtestnzc_ps(<4 x float> %a0, <4 x float> %a1) {
   ; CHECK: vtestps
   ; CHECK: seta
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.avx.vtestnzc.ps(<4 x float> %a0, <4 x float> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -2513,7 +2513,7 @@ declare i32 @llvm.x86.avx.vtestnzc.ps(<4 x float>, <4 x float>) nounwind readnon
 define i32 @test_x86_avx_vtestnzc_ps_256(<8 x float> %a0, <8 x float> %a1) {
   ; CHECK: vtestps
   ; CHECK: seta
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.avx.vtestnzc.ps.256(<8 x float> %a0, <8 x float> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -2523,7 +2523,7 @@ declare i32 @llvm.x86.avx.vtestnzc.ps.256(<8 x float>, <8 x float>) nounwind rea
 define i32 @test_x86_avx_vtestz_pd(<2 x double> %a0, <2 x double> %a1) {
   ; CHECK: vtestpd
   ; CHECK: sete
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.avx.vtestz.pd(<2 x double> %a0, <2 x double> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -2533,7 +2533,7 @@ declare i32 @llvm.x86.avx.vtestz.pd(<2 x double>, <2 x double>) nounwind readnon
 define i32 @test_x86_avx_vtestz_pd_256(<4 x double> %a0, <4 x double> %a1) {
   ; CHECK: vtestpd
   ; CHECK: sete
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.avx.vtestz.pd.256(<4 x double> %a0, <4 x double> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -2543,7 +2543,7 @@ declare i32 @llvm.x86.avx.vtestz.pd.256(<4 x double>, <4 x double>) nounwind rea
 define i32 @test_x86_avx_vtestz_ps(<4 x float> %a0, <4 x float> %a1) {
   ; CHECK: vtestps
   ; CHECK: sete
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.avx.vtestz.ps(<4 x float> %a0, <4 x float> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
@@ -2553,7 +2553,7 @@ declare i32 @llvm.x86.avx.vtestz.ps(<4 x float>, <4 x float>) nounwind readnone
 define i32 @test_x86_avx_vtestz_ps_256(<8 x float> %a0, <8 x float> %a1) {
   ; CHECK: vtestps
   ; CHECK: sete
-  ; CHECK: movzx
+  ; CHECK: movzbl
   %res = call i32 @llvm.x86.avx.vtestz.ps.256(<8 x float> %a0, <8 x float> %a1) ; <i32> [#uses=1]
   ret i32 %res
 }
index 91e36b0d5365cc7097ef87e926dd1a60770c44be..d2c30c64f23737f3ea2d32b58a90fbdca3be5195 100644 (file)
@@ -1,7 +1,7 @@
 ; RUN: llc < %s -march=x86-64 | FileCheck %s
 
 ; CHECK: @bar1
-; CHECK: movzx
+; CHECK: movzbl
 ; CHECK: callq
 define void @bar1(i1 zeroext %v1) nounwind ssp {
 entry:
@@ -11,7 +11,7 @@ entry:
 }
 
 ; CHECK: @bar2
-; CHECK-NOT: movzx
+; CHECK-NOT: movzbl
 ; CHECK: callq
 define void @bar2(i8 zeroext %v1) nounwind ssp {
 entry:
@@ -22,7 +22,7 @@ entry:
 
 ; CHECK: @bar3
 ; CHECK: callq
-; CHECK-NOT: movzx
+; CHECK-NOT: movzbl
 ; CHECK-NOT: and
 ; CHECK: ret
 define zeroext i1 @bar3() nounwind ssp {
index 2e71ef20cf515326a575e393d72aa83aad50b438..39d9d1e9ec0e211cdc64383dc605cc04da4dc3e8 100644 (file)
@@ -121,7 +121,7 @@ define i32 @test5(i32* nocapture %P) nounwind readonly {
 entry:
 ; CHECK: test5:
 ; CHECK:       setg    %al
-; CHECK:       movz  %al, %eax
+; CHECK:       movzbl  %al, %eax
 ; CHECK:       orl     $-2, %eax
 ; CHECK:       ret
 
@@ -135,7 +135,7 @@ define i32 @test6(i32* nocapture %P) nounwind readonly {
 entry:
 ; CHECK: test6:
 ; CHECK:       setl    %al
-; CHECK:       movz  %al, %eax
+; CHECK:       movzbl  %al, %eax
 ; CHECK:       leal    4(%rax,%rax,8), %eax
 ; CHECK:        ret
        %0 = load i32* %P, align 4              ; <i32> [#uses=1]
index 6e88fc1cbe0c7a31c28b6310a824631282f2bf12..ef5e353e9f9fbfa1dbcb2cc5d3f6e948e727d174 100644 (file)
@@ -38,7 +38,7 @@ define i64 @test3(i64 %x) nounwind {
 ; CHECK: test3:
 ; CHECK:       testq   %rdi, %rdi
 ; CHECK:       sete    %al
-; CHECK:       movz  %al, %eax
+; CHECK:       movzbl  %al, %eax
 ; CHECK:       ret
 }
 
@@ -49,7 +49,7 @@ define i64 @test4(i64 %x) nounwind {
 ; CHECK: test4:
 ; CHECK:       testq   %rdi, %rdi
 ; CHECK:       setle   %al
-; CHECK:       movz  %al, %eax
+; CHECK:       movzbl  %al, %eax
 ; CHECK:       ret
 }
 
index ebefd74f1925791cc59567f8981bae8668b93c8f..48abfd0f26e57312db849644c08c137c875f4047 100644 (file)
@@ -14,7 +14,7 @@ define i32 @test1(i32 %t3, i32* %t1) nounwind {
 ; X32:         ret
 
 ; X64: test1:
-; X64:         movs  %e[[A0:di|cx]], %rax
+; X64:         movslq  %e[[A0:di|cx]], %rax
 ; X64:         movl    (%r[[A1:si|dx]],%rax,4), %eax
 ; X64:         ret
 
@@ -81,7 +81,7 @@ define i64 @test5(i8* %A, i32 %I, i64 %B) nounwind {
   %v11 = add i64 %B, %v10
   ret i64 %v11
 ; X64: test5:
-; X64: movs  %e[[A1]], %rax
+; X64: movslq  %e[[A1]], %rax
 ; X64-NEXT: movq       (%r[[A0]],%rax), %rax
 ; X64-NEXT: addq       %{{rdx|r8}}, %rax
 ; X64-NEXT: ret
index e312bcc2e2178dffbd4725bac9abce616892ea3b..76ffd66524b94fbbfbeea7fc4cc0677ae531a3ec 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86 | grep {movz      %\[abcd\]h,} | count 7
+; RUN: llc < %s -march=x86 | grep {movzbl      %\[abcd\]h,} | count 7
 
 ; Use h-register extract and zero-extend.
 
index b477d7759c1cc935b8ac937052a3ca3a982d6b93..cdc75af92e4304bad494d97d86c6cd0fa09dc6a8 100644 (file)
@@ -70,7 +70,7 @@ define i64 @qux64(i64 inreg %x) nounwind {
 ; WIN64:  movzbl %ch, %eax
 
 ; X86-32: qux64:
-; X86-32: movzx %ah, %eax
+; X86-32: movzbl %ah, %eax
   %t0 = lshr i64 %x, 8
   %t1 = and i64 %t0, 255
   ret i64 %t1
@@ -85,7 +85,7 @@ define i32 @qux32(i32 inreg %x) nounwind {
 ; WIN64:  movzbl %ch, %eax
 
 ; X86-32: qux32:
-; X86-32: movzx %ah, %eax
+; X86-32: movzbl %ah, %eax
   %t0 = lshr i32 %x, 8
   %t1 = and i32 %t0, 255
   ret i32 %t1
@@ -100,7 +100,7 @@ define i16 @qux16(i16 inreg %x) nounwind {
 ; WIN64:  movzbl %ch, %eax
 
 ; X86-32: qux16:
-; X86-32: movzx %ah, %eax
+; X86-32: movzbl %ah, %eax
   %t0 = lshr i16 %x, 8
   ret i16 %t0
 }
index 702e90bf5edb855465a870d04b067f2a62030670..16e13f839664560239147cba0f89d0a5b6c42526 100644 (file)
@@ -1,5 +1,5 @@
 ; RUN: llc < %s -march=x86 > %t
-; RUN: grep {movz    %\[abcd\]h,} %t | count 1
+; RUN: grep {movzbl    %\[abcd\]h,} %t | count 1
 ; RUN: grep {shll      \$3,} %t | count 1
 
 ; Use an h register, but don't omit the explicit shift for
index 8442d7a7c4ed66588f26f9a89a6c28fb803905b9..78d7e776cf227930191a5a915997f2f20efb5fe4 100644 (file)
@@ -1,5 +1,5 @@
 ; PR2094
-; RUN: llc < %s -march=x86-64 | grep movsx
+; RUN: llc < %s -march=x86-64 | grep movslq
 ; RUN: llc < %s -march=x86-64 | grep addps
 ; RUN: llc < %s -march=x86-64 | grep paddd
 ; RUN: llc < %s -march=x86-64 | not grep movq
index 5698b1a91481b2012c58389f71bb15ea1d16950f..f23c0201954894173170772a3dc9d69e3408585c 100644 (file)
@@ -1,6 +1,6 @@
 ; RUN: llc < %s -march=x86-64 > %t
 ; RUN: grep and %t | count 6
-; RUN: grep movzx %t | count 6
+; RUN: grep movzb %t | count 6
 ; RUN: grep sar %t | count 12
 
 ; Don't optimize away zext-inreg and sext-inreg on the loop induction
index d9c5f53f21f02a5e01c7f74f533155df76c01080..1127b6093215b5c67efff74beb0361ee2687cf52 100644 (file)
@@ -1,7 +1,6 @@
-; RUN: llc < %s -march=x86 -disable-cgp-branch-opts | FileCheck %s
+; RUN: llc < %s -march=x86 -disable-cgp-branch-opts | grep movzbl
 ; PR3366
 
-; CHECK: movzx
 define void @_ada_c34002a() nounwind {
 entry:
   %0 = load i8* null, align 1
index e973c5a466ebf7504d8850cd8315f76154c2dba6..b582806c96a4316d1c8b6ca640ebfdb732c9cd96 100644 (file)
@@ -7,7 +7,7 @@ target triple = "x86_64-apple-darwin11"
 ; ISel doesn't yet know how to eliminate this extra zero-extend. But until
 ; it knows how to do so safely, it shouldn;t eliminate it.
 ; CHECK: movzbl  (%rdi), %eax
-; CHECK: movz  %ax, %eax
+; CHECK: movzwl  %ax, %eax
 
 define i64 @_ZL5matchPKtPKhiR9MatchData(i8* %tmp13) nounwind {
 entry:
index d7622651b10e4d8bc6be12b4dfa00c0405e34253..101bb29593cc8f889192a2ece9d01457a6f68787 100644 (file)
@@ -4,8 +4,8 @@ define signext i16 @foo(i16 signext %x) nounwind {
 entry:
 ; CHECK: foo:
 ; CHECK: movzwl 4(%esp), %eax
-; CHECK: xorl   $21998, %eax
-; CHECK: movs %ax, %eax
+; CHECK: xorl $21998, %eax
+; CHECK: movswl %ax, %eax
   %0 = xor i16 %x, 21998
   ret i16 %0
 }
index 02c9502bf967ca9a23cbfe4d65aba7eb5241c825..ce04e07854a49651f84d8cef6f1a53fcc5951438 100644 (file)
@@ -30,7 +30,7 @@ bb91:         ; preds = %bb84
        ret i32 0
 ; CHECK: test2:
 ; CHECK: movnew
-; CHECK: movsx
+; CHECK: movswl
 }
 
 declare i1 @return_false()
index 349912c6ed55182267b81c9fbba29d370b4f92d7..c37e15d24f346b946f084d33fa5967862e0c3b1a 100644 (file)
@@ -8,7 +8,7 @@ define zeroext i16 @t1(i16 zeroext %x) nounwind readnone ssp {
 entry:
 ; CHECK: t1:
 ; CHECK: seta %al
-; CHECK: movzx %al, %eax
+; CHECK: movzbl %al, %eax
 ; CHECK: shll $5, %eax
   %0 = icmp ugt i16 %x, 26                        ; <i1> [#uses=1]
   %iftmp.1.0 = select i1 %0, i16 32, i16 0        ; <i16> [#uses=1]
index c86e59177f97eda6e2281297325c9fd0b2758d69..da1a1871e7e8ca304df54800e2fa825dca74c543 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86 | grep movzx | count 1
+; RUN: llc < %s -march=x86 | grep movzbl | count 1
 ; rdar://6699246
 
 define signext i8 @t1(i8* %A) nounwind readnone ssp {
index d6219e09e5e7806f2996dbb99357d02eed22d666..b2b9f8121fd6f0dd28412b74c580f0712ba49354 100644 (file)
@@ -3,7 +3,7 @@
 
 define i64 @t(i64 %A, i64 %B, i32* %P, i64 *%P2) nounwind {
 ; CHECK: t:
-; CHECK: movsx %e{{.*}}, %rax
+; CHECK: movslq %e{{.*}}, %rax
 ; CHECK: movq %rax
 ; CHECK: movl %eax
   %C = add i64 %A, %B
index d10545cd5dbb5da8a3a3e8547dec506dd11b1deb..0827221875b1dd6f8fc4243bb912006b80fe4bd3 100644 (file)
@@ -1,6 +1,6 @@
 ; RUN: llc < %s -march=x86 | grep {movl        8(.esp), %eax}
 ; RUN: llc < %s -march=x86 | grep {shrl        .eax}
-; RUN: llc < %s -march=x86 | grep {movs      .ax, .eax}
+; RUN: llc < %s -march=x86 | grep {movswl      .ax, .eax}
 
 define i32 @test1(i64 %a) nounwind {
         %tmp29 = lshr i64 %a, 24                ; <i64> [#uses=1]
index e31ee76905ebc381a126f8eafe6fa3069a04f6d1..c9976617a2479767b06e6894e1f685e24aef473a 100644 (file)
@@ -9,6 +9,6 @@ define i1 @a(i32 %x) zeroext nounwind {
 ; CHECK: a:
 ; CHECK: mull
 ; CHECK: seto %al
-; CHECK: movzx %al, %eax
+; CHECK: movzbl        %al, %eax
 ; CHECK: ret
 }
index 67db3aa0a4d17cb6730cd346e773421fd826af69..8e24fda1835d59e7aea3fcb5c08a0a6477f93b62 100644 (file)
@@ -57,7 +57,7 @@ entry:
 define void @shift3a(<8 x i16> %val, <8 x i16>* %dst, <8 x i16> %amt) nounwind {
 entry:
 ; CHECK: shift3a:
-; CHECK: movzx
+; CHECK: movzwl
 ; CHECK: psllw
   %shamt = shufflevector <8 x i16> %amt, <8 x i16> undef, <8 x i32> <i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6>
   %shl = shl <8 x i16> %val, %shamt
index aa38d9fcb08868f5a2125531d576d13376f4b8e1..969cb512beb348524dd1e9f246c0e94a64cfd889 100644 (file)
@@ -1,6 +1,6 @@
 ; RUN: llc < %s -march=x86 -mattr=+sse42 | FileCheck %s
-; CHECK: movsx
-; CHECK: movsx
+; CHECK: movswl
+; CHECK: movswl
 
 ; sign extension v2i32 to v2i16
 
index d610adc633621ef40437b01e0d28f6611b24ed15..7f96543ba49d4031b534d9aea448f29aba71050a 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc < %s | grep movsx
+; RUN: llc < %s | grep movswl
 
 target datalayout = "e-p:64:64"
 target triple = "x86_64-apple-darwin8"
index 55ef050df01425af5234ab19cc21604f86835a87..fe08559be6f6c435c82907ad2c83332f87d00dee 100644 (file)
@@ -681,65 +681,65 @@ btq $0x01,%rdx
 // CHECK:  encoding: [0x48,0x0f,0xba,0xe2,0x01]
 
 //rdar://8017633
-// CHECK: movz       %al, %esi
+// CHECK: movzbl       %al, %esi
 // CHECK:  encoding: [0x0f,0xb6,0xf0]
         movzx %al, %esi
 
-// CHECK: movz       %al, %rsi
+// CHECK: movzbq       %al, %rsi
 // CHECK:  encoding: [0x48,0x0f,0xb6,0xf0]
         movzx %al, %rsi
 
-// CHECK: movs       %al, %ax
+// CHECK: movsbw       %al, %ax
 // CHECK: encoding: [0x66,0x0f,0xbe,0xc0]
-        movsx %al, %ax
+movsx %al, %ax
 
-// CHECK: movs       %al, %eax
+// CHECK: movsbl       %al, %eax
 // CHECK: encoding: [0x0f,0xbe,0xc0]
-        movsx %al, %eax
+movsx %al, %eax
 
-// CHECK: movs       %ax, %eax
+// CHECK: movswl       %ax, %eax
 // CHECK: encoding: [0x0f,0xbf,0xc0]
-        movsx %ax, %eax
+movsx %ax, %eax
 
-// CHECK: movs       %bl, %rax
+// CHECK: movsbq       %bl, %rax
 // CHECK: encoding: [0x48,0x0f,0xbe,0xc3]
-        movsx %bl, %rax
+movsx %bl, %rax
 
-// CHECK: movsx %cx, %rax
+// CHECK: movswq %cx, %rax
 // CHECK: encoding: [0x48,0x0f,0xbf,0xc1]
-        movsx %cx, %rax
+movsx %cx, %rax
 
-// CHECK: movs       %edi, %rax
+// CHECK: movslq       %edi, %rax
 // CHECK: encoding: [0x48,0x63,0xc7]
-        movsx %edi, %rax
+movsx %edi, %rax
 
-// CHECK: movz       %al, %ax
+// CHECK: movzbw       %al, %ax
 // CHECK: encoding: [0x66,0x0f,0xb6,0xc0]
-        movzx %al, %ax
+movzx %al, %ax
 
-// CHECK: movz       %al, %eax
+// CHECK: movzbl       %al, %eax
 // CHECK: encoding: [0x0f,0xb6,0xc0]
-        movzx %al, %eax
+movzx %al, %eax
 
-// CHECK: movz       %ax, %eax
+// CHECK: movzwl       %ax, %eax
 // CHECK: encoding: [0x0f,0xb7,0xc0]
-        movzx %ax, %eax
+movzx %ax, %eax
 
-// CHECK: movz       %bl, %rax
+// CHECK: movzbq       %bl, %rax
 // CHECK: encoding: [0x48,0x0f,0xb6,0xc3]
-        movzx %bl, %rax
+movzx %bl, %rax
 
-// CHECK: movz       %cx, %rax
+// CHECK: movzwq       %cx, %rax
 // CHECK: encoding: [0x48,0x0f,0xb7,0xc1]
-        movzx %cx, %rax
+movzx %cx, %rax
 
 // CHECK: movsbw       (%rax), %ax
 // CHECK: encoding: [0x66,0x0f,0xbe,0x00]
-        movsx (%rax), %ax
+movsx (%rax), %ax
 
 // CHECK: movzbw       (%rax), %ax
 // CHECK: encoding: [0x66,0x0f,0xb6,0x00]
-        movzx (%rax), %ax
+movzx (%rax), %ax
 
 
 // rdar://7873482