Xamarin Public Jenkins (auto-signing) 64ac736ec5 Imported Upstream version 6.0.0.172
Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
2019-04-12 14:10:50 +00:00

17 lines
376 B
LLVM

; RUN: llc -O2 < %s | FileCheck %s
target triple = "powerpc64le-linux-gnu"
define void @foo(i32 %v, i16* %p) {
%1 = and i32 %v, -65536
%2 = tail call i32 @llvm.bswap.i32(i32 %1)
%conv = trunc i32 %2 to i16
store i16 %conv, i16* %p
ret void
; CHECK: srwi
; CHECK: sthbrx
; CHECK-NOT: stwbrx
}
declare i32 @llvm.bswap.i32(i32)