llvm-6502/test/CodeGen/X86/bitcast-i256.ll
Michael Liao 092122f124 Enhance type legalization on bitcast from vector to integer
- Find a legal vector type before casting and extracting element from it.
- As the new vector type may have more than 2 elements, build the final
  hi/lo pair by BFS pairing them from bottom to top.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163830 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-13 19:58:21 +00:00

12 lines
269 B
LLVM

; RUN: llc -mtriple=x86_64-unknown-unknown -mcpu=core-avx-i < %s | FileCheck %s --check-prefix CHECK
define i256 @foo(<8 x i32> %a) {
%r = bitcast <8 x i32> %a to i256
ret i256 %r
; CHECK: foo
; CHECK: vextractf128
; CHECK: vpextrq
; CHECK: vpextrq
; CHECK: ret
}