summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-11-17 20:41:55 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-11-17 20:41:55 +0000
commitbae950131c2f5b19c40ae9c7adbbabb787eea117 (patch)
treed9422f97c94881b64ed239a172e4649e31d8050d
parent73106b5e2afe7c0d3043cae710b35926d64c7a2a (diff)
downloadbcm5719-llvm-bae950131c2f5b19c40ae9c7adbbabb787eea117.tar.gz
bcm5719-llvm-bae950131c2f5b19c40ae9c7adbbabb787eea117.zip
Add a x86-64 test case: movb %sil, %ah is illegal.
llvm-svn: 31829
-rw-r--r--llvm/test/Regression/CodeGen/X86/2006-11-17-IllegalMove.ll41
1 files changed, 41 insertions, 0 deletions
diff --git a/llvm/test/Regression/CodeGen/X86/2006-11-17-IllegalMove.ll b/llvm/test/Regression/CodeGen/X86/2006-11-17-IllegalMove.ll
new file mode 100644
index 00000000000..c4b97c9cfdd
--- /dev/null
+++ b/llvm/test/Regression/CodeGen/X86/2006-11-17-IllegalMove.ll
@@ -0,0 +1,41 @@
+; RUN: llvm-as < %s | llc -march=x86-64 &&
+; RUN: llvm-as < %s | llc -march=x86-64 | not grep 'movb %sil, %ah' &&
+; RUN: llvm-as < %s | llc -march=x86-64 | grep 'movzbw %al, %ax'
+
+void %handle_vector_size_attribute() {
+entry:
+ %tmp69 = load uint* null ; <uint> [#uses=1]
+ switch uint %tmp69, label %bb84 [
+ uint 2, label %bb77
+ uint 1, label %bb77
+ ]
+
+bb77: ; preds = %entry, %entry
+ %tmp99 = udiv ulong 0, 0 ; <ulong> [#uses=1]
+ %tmp = load ubyte* null ; <ubyte> [#uses=1]
+ %tmp114 = seteq ulong 0, 0 ; <bool> [#uses=1]
+ br bool %tmp114, label %cond_true115, label %cond_next136
+
+bb84: ; preds = %entry
+ ret void
+
+cond_true115: ; preds = %bb77
+ %tmp118 = load ubyte* null ; <ubyte> [#uses=1]
+ br bool false, label %cond_next129, label %cond_true120
+
+cond_true120: ; preds = %cond_true115
+ %tmp127 = udiv ubyte %tmp, %tmp118 ; <ubyte> [#uses=1]
+ %tmp127 = cast ubyte %tmp127 to ulong ; <ulong> [#uses=1]
+ br label %cond_next129
+
+cond_next129: ; preds = %cond_true120, %cond_true115
+ %iftmp.30.0 = phi ulong [ %tmp127, %cond_true120 ], [ 0, %cond_true115 ] ; <ulong> [#uses=1]
+ %tmp132 = seteq ulong %iftmp.30.0, %tmp99 ; <bool> [#uses=1]
+ br bool %tmp132, label %cond_false148, label %cond_next136
+
+cond_next136: ; preds = %cond_next129, %bb77
+ ret void
+
+cond_false148: ; preds = %cond_next129
+ ret void
+}
OpenPOWER on IntegriCloud