mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
2a53c3fac5
After Alexey Volkov, I'm adding the same property for KNL, that prefers ADD/SUB instead of INC/DEC. Added a test. llvm-svn: 212178
14 lines
268 B
LLVM
14 lines
268 B
LLVM
; RUN: llc < %s -march=x86-64 -mtriple=x86_64-apple-darwin -mcpu=knl | FileCheck %s
|
|
|
|
;CHECK-LABEL: test
|
|
;CHECK-NOT: dec
|
|
;CHECK_NOT: enc
|
|
;CHECK: ret
|
|
define i32 @test(i32 %a, i32 %b) {
|
|
%a1 = add i32 %a, -1
|
|
%b1 = add i32 %b, 1
|
|
%res = mul i32 %a1, %b1
|
|
ret i32 %res
|
|
}
|
|
|