2019-08-19 22:34:08 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
2017-08-02 08:28:10 +08:00
|
|
|
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=knl | FileCheck %s
|
2014-07-02 22:11:05 +08:00
|
|
|
|
|
|
|
define i32 @test(i32 %a, i32 %b) {
|
2019-08-19 22:34:08 +08:00
|
|
|
; CHECK-LABEL: test:
|
|
|
|
; CHECK: ## %bb.0:
|
|
|
|
; CHECK-NEXT: ## kill: def $edi killed $edi def $rdi
|
|
|
|
; CHECK-NEXT: leal -1(%rdi), %eax
|
|
|
|
; CHECK-NEXT: addl $1, %esi
|
|
|
|
; CHECK-NEXT: imull %esi, %eax
|
|
|
|
; CHECK-NEXT: retq
|
2014-07-02 22:11:05 +08:00
|
|
|
%a1 = add i32 %a, -1
|
|
|
|
%b1 = add i32 %b, 1
|
|
|
|
%res = mul i32 %a1, %b1
|
|
|
|
ret i32 %res
|
|
|
|
}
|
|
|
|
|