[llvm-commits] [llvm] r165954 - /llvm/trunk/test/CodeGen/X86/pr14088.ll
Rafael Espindola
rafael.espindola at gmail.com
Mon Oct 15 12:00:10 PDT 2012
Author: rafael
Date: Mon Oct 15 14:00:10 2012
New Revision: 165954
URL: http://llvm.org/viewvc/llvm-project?rev=165954&view=rev
Log:
Add testcase for pr14088.
Added:
llvm/trunk/test/CodeGen/X86/pr14088.ll
Added: llvm/trunk/test/CodeGen/X86/pr14088.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pr14088.ll?rev=165954&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/pr14088.ll (added)
+++ llvm/trunk/test/CodeGen/X86/pr14088.ll Mon Oct 15 14:00:10 2012
@@ -0,0 +1,25 @@
+; RUN: llc -mtriple x86_64-linux %s -o - | FileCheck %s
+define i32 @f(i1 %foo, i16* %tm_year2, i8* %bar, i16 %zed, i32 %zed2) {
+entry:
+ br i1 %foo, label %return, label %if.end
+
+if.end:
+ %rem = srem i32 %zed2, 100
+ %conv3 = trunc i32 %rem to i16
+ store i16 %conv3, i16* %tm_year2
+ %sext = shl i32 %rem, 16
+ %conv5 = ashr exact i32 %sext, 16
+ %div = sdiv i32 %conv5, 10
+ %conv6 = trunc i32 %div to i8
+ store i8 %conv6, i8* %bar
+ br label %return
+
+return:
+ %retval.0 = phi i32 [ 0, %if.end ], [ -1, %entry ]
+ ret i32 %retval.0
+}
+
+; We were miscompiling this and using %ax instead of %cx in the movw.
+; CHECK: movswl %cx, %ecx
+; CHECK: movw %cx, (%rsi)
+; CHECK: movslq %ecx, %rcx
More information about the llvm-commits
mailing list