[llvm-commits] [llvm] r135133 - /llvm/trunk/test/CodeGen/ARM/fold-const.ll

Eric Christopher echristo at apple.com
Wed Jul 13 23:23:09 PDT 2011


Author: echristo
Date: Thu Jul 14 01:23:09 2011
New Revision: 135133

URL: http://llvm.org/viewvc/llvm-project?rev=135133&view=rev
Log:
Add a testcase for r135123.

Part of rdar://9761830

Added:
    llvm/trunk/test/CodeGen/ARM/fold-const.ll

Added: llvm/trunk/test/CodeGen/ARM/fold-const.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fold-const.ll?rev=135133&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/fold-const.ll (added)
+++ llvm/trunk/test/CodeGen/ARM/fold-const.ll Thu Jul 14 01:23:09 2011
@@ -0,0 +1,14 @@
+; RUN: llc < %s -march=arm -mattr=+v7 | FileCheck %s
+
+define i32 @f(i32 %a) nounwind readnone optsize ssp {
+entry:
+  %conv = zext i32 %a to i64
+  %tmp1 = tail call i64 @llvm.ctlz.i64(i64 %conv)
+; CHECK: clz
+; CHECK-NOT: adds
+  %cast = trunc i64 %tmp1 to i32
+  %sub = sub nsw i32 63, %cast
+  ret i32 %sub
+}
+
+declare i64 @llvm.ctlz.i64(i64) nounwind readnone





More information about the llvm-commits mailing list