2016-07-10 04:55:20 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
|
|
; RUN: llc < %s -mtriple=i686-unknown -mattr=+sse2 | FileCheck %s --check-prefix=X32
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+sse2 | FileCheck %s --check-prefix=X64
|
2015-03-06 09:13:01 +08:00
|
|
|
|
|
|
|
; Verify that we don't fail when shift by zero is encountered.
|
|
|
|
|
|
|
|
define i64 @test1(<2 x i64> %a) {
|
2016-07-10 04:55:20 +08:00
|
|
|
; X32-LABEL: test1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; X32: # %bb.0: # %entry
|
2017-02-28 05:01:57 +08:00
|
|
|
; X32-NEXT: movd %xmm0, %eax
|
2018-07-17 17:45:35 +08:00
|
|
|
; X32-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3]
|
|
|
|
; X32-NEXT: movd %xmm0, %edx
|
2016-07-10 04:55:20 +08:00
|
|
|
; X32-NEXT: retl
|
|
|
|
;
|
|
|
|
; X64-LABEL: test1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; X64: # %bb.0: # %entry
|
2017-04-26 15:08:44 +08:00
|
|
|
; X64-NEXT: movq %xmm0, %rax
|
2016-07-10 04:55:20 +08:00
|
|
|
; X64-NEXT: retq
|
2015-03-06 09:13:01 +08:00
|
|
|
entry:
|
|
|
|
%c = shl <2 x i64> %a, <i64 0, i64 2>
|
|
|
|
%d = extractelement <2 x i64> %c, i32 0
|
|
|
|
ret i64 %d
|
|
|
|
}
|