Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AArch64] Add test case for pr55644. NFC
- Loading branch information
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |