mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
74f6ea6c18
Summary: ValueTracking was recognizing not all variations of clamp. Swapping of true value and false value of select was added to fix this problem. The first patch was reverted because it caused miscompile in NVPTX target. Added corresponding test cases. Reviewers: spatel, majnemer, efriedma, reames Subscribers: llvm-commits, jholewinski Differential Revision: https://reviews.llvm.org/D39240 llvm-svn: 316795
10 lines
255 B
LLVM
10 lines
255 B
LLVM
; RUN: llc < %s -march=nvptx -O0 | FileCheck %s
|
|
|
|
define i16 @test1(i16* %sur1) {
|
|
; CHECK-NOT: mov.u16 %rs{{[0-9]+}}, 32767
|
|
%_tmp21.i = icmp sle i16 0, 0
|
|
%_tmp22.i = select i1 %_tmp21.i, i16 0, i16 32767
|
|
store i16 %_tmp22.i, i16* %sur1
|
|
ret i16 0
|
|
}
|