[llvm] r324404 - [AArch64] add test to show sub-optimal isel; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 6 13:25:02 PST 2018
Author: spatel
Date: Tue Feb 6 13:25:02 2018
New Revision: 324404
URL: http://llvm.org/viewvc/llvm-project?rev=324404&view=rev
Log:
[AArch64] add test to show sub-optimal isel; NFC
Added:
llvm/trunk/test/CodeGen/AArch64/sub1.ll
Added: llvm/trunk/test/CodeGen/AArch64/sub1.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AArch64/sub1.ll?rev=324404&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/AArch64/sub1.ll (added)
+++ llvm/trunk/test/CodeGen/AArch64/sub1.ll Tue Feb 6 13:25:02 2018
@@ -0,0 +1,17 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -mtriple=aarch64-unknown-unknown | FileCheck %s
+
+define i64 @sub1_disguised_constant(i64 %x) {
+; CHECK-LABEL: sub1_disguised_constant:
+; CHECK: // %bb.0:
+; CHECK-NEXT: orr w8, wzr, #0xffff
+; CHECK-NEXT: add w8, w0, w8
+; CHECK-NEXT: and w8, w0, w8
+; CHECK-NEXT: and x0, x8, #0xffff
+; CHECK-NEXT: ret
+ %a1 = and i64 %x, 65535
+ %a2 = add i64 %x, 65535
+ %r = and i64 %a1, %a2
+ ret i64 %r
+}
+
More information about the llvm-commits
mailing list