[llvm] 75eb057 - [AArch64] Add test case for pr55644. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon May 23 11:14:33 PDT 2022


Author: Craig Topper
Date: 2022-05-23T11:13:57-07:00
New Revision: 75eb0576debda4343fea35b1e2f01d8cbea12ab7

URL: https://github.com/llvm/llvm-project/commit/75eb0576debda4343fea35b1e2f01d8cbea12ab7
DIFF: https://github.com/llvm/llvm-project/commit/75eb0576debda4343fea35b1e2f01d8cbea12ab7.diff

LOG: [AArch64] Add test case for pr55644. NFC

Added: 
    llvm/test/CodeGen/AArch64/pr55644.ll

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/AArch64/pr55644.ll b/llvm/test/CodeGen/AArch64/pr55644.ll
new file mode 100644
index 0000000000000..ac98de13c6f07
--- /dev/null
+++ b/llvm/test/CodeGen/AArch64/pr55644.ll
@@ -0,0 +1,18 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -mtriple=aarch64-apple-darwin | FileCheck %s
+
+define i1 @f(i2 %0) {
+; CHECK-LABEL: f:
+; CHECK:       ; %bb.0:
+; CHECK-NEXT:    sbfx w8, w0, #0, #2
+; CHECK-NEXT:    add w8, w8, w8
+; CHECK-NEXT:    lsl w9, w8, #30
+; CHECK-NEXT:    cmp w8, w9, asr #30
+; CHECK-NEXT:    cset w0, ne
+; CHECK-NEXT:    ret
+  %2 = call { i2, i1 } @llvm.smul.with.overflow.i2(i2 %0, i2 -2)
+  %3 = extractvalue { i2, i1 } %2, 1
+  ret i1 %3
+}
+
+declare { i2, i1 } @llvm.smul.with.overflow.i2(i2, i2)


        


More information about the llvm-commits mailing list