mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
82abdf7e36
Summary: The BUILD_VECTOR node will truncate its operators to match the type. We need to take this into account when constant folding - we need to perform a truncation before constant folding the elements. This is because the upper bits can change the result, depending on the operation type (for example this is the case for min/max). This change also adds a regression test. Reviewers: jmolloy Subscribers: jmolloy, llvm-commits Differential Revision: http://reviews.llvm.org/D12697 llvm-svn: 247265
13 lines
423 B
LLVM
13 lines
423 B
LLVM
; RUN: llc -mtriple=aarch64-none-linux-gnu < %s -o -| FileCheck %s
|
|
|
|
; Function Attrs: nounwind readnone
|
|
declare <4 x i16> @llvm.aarch64.neon.smax.v4i16(<4 x i16>, <4 x i16>)
|
|
|
|
; CHECK-LABEL: test
|
|
define <4 x i16> @test() {
|
|
entry:
|
|
; CHECK: movi d{{[0-9]+}}, #0000000000000000
|
|
%0 = tail call <4 x i16> @llvm.aarch64.neon.smax.v4i16(<4 x i16> <i16 -1, i16 -1, i16 -1, i16 -1>, <4 x i16> zeroinitializer)
|
|
ret <4 x i16> %0
|
|
}
|