Xamarin Public Jenkins (auto-signing) f32dbaf0b2 Imported Upstream version 5.18.0.225
Former-commit-id: 10196d987d5fc5564b9d3b33b1fdf13190f4d0b5
2018-12-21 19:01:49 +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)