Xamarin Public Jenkins (auto-signing) 8625704ad8 Imported Upstream version 5.18.0.179
Former-commit-id: 67aa10e65b237e1c4537630979ee99ebe1374215
2018-10-25 08:34:57 +00:00

15 lines
312 B
LLVM

; Testing peephole for generating shorter code for (and (xor b, -1), a)
;
; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
define i64 @f1(i64 %a, i64 %b) {
; CHECK-LABEL: f1:
; CHECK: ngr %r3, %r2
; CHECK: xgr %r2, %r3
; CHECK: br %r14
%neg = xor i64 %b, -1
%and = and i64 %neg, %a
ret i64 %and
}