1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s --check-prefix=X64
4 define i32 @neg_lshr_signbit(i32 %x) {
5 ; X64-LABEL: neg_lshr_signbit:
7 ; X64-NEXT: movl %edi, %eax
8 ; X64-NEXT: sarl $31, %eax
15 define i64 @neg_ashr_signbit(i64 %x) {
16 ; X64-LABEL: neg_ashr_signbit:
18 ; X64-NEXT: movq %rdi, %rax
19 ; X64-NEXT: shrq $63, %rax
26 define <4 x i32> @neg_ashr_signbit_vec(<4 x i32> %x) {
27 ; X64-LABEL: neg_ashr_signbit_vec:
29 ; X64-NEXT: psrld $31, %xmm0
31 %sh = ashr <4 x i32> %x, <i32 31, i32 31, i32 31, i32 31>
32 %neg = sub <4 x i32> zeroinitializer, %sh
36 define <8 x i16> @neg_lshr_signbit_vec(<8 x i16> %x) {
37 ; X64-LABEL: neg_lshr_signbit_vec:
39 ; X64-NEXT: psraw $15, %xmm0
41 %sh = lshr <8 x i16> %x, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
42 %neg = sub <8 x i16> zeroinitializer, %sh