mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 00:32:55 +00:00
7e606e2e98
it to a normal binop. Patch by Alastair Lynn, testcase by me. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86524 91177308-0d34-0410-b5e6-96231b3b80d8
13 lines
319 B
LLVM
13 lines
319 B
LLVM
; RUN: opt %s -instcombine -S | FileCheck %s
|
|
|
|
declare {i8, i1} @llvm.uadd.with.overflow.i8(i8, i8)
|
|
|
|
define i8 @test1(i8 %A, i8 %B) {
|
|
%x = call {i8, i1} @llvm.uadd.with.overflow.i8(i8 %A, i8 %B)
|
|
%y = extractvalue {i8, i1} %x, 0
|
|
ret i8 %y
|
|
; CHECK: @test1
|
|
; CHECK-NEXT: %y = add i8 %A, %B
|
|
; CHECK-NEXT: ret i8 %y
|
|
}
|