mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-16 14:31:59 +00:00
Add missed extract_element pattern
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80408 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e4b275610a
commit
2324bdc1ee
@ -284,7 +284,7 @@ def DSubReg_f64_reg : SDNodeXForm<imm, [{
|
||||
return CurDAG->getTargetConstant(5 + N->getZExtValue(), MVT::i32);
|
||||
}]>;
|
||||
|
||||
// Extract S sub-registers of Q registers.
|
||||
// Extract S sub-registers of Q/D registers.
|
||||
// (arm_ssubreg_0 is 1; arm_ssubreg_1 is 2; etc.)
|
||||
def SSubReg_f32_reg : SDNodeXForm<imm, [{
|
||||
return CurDAG->getTargetConstant(1 + N->getZExtValue(), MVT::i32);
|
||||
@ -1672,6 +1672,8 @@ def : Pat<(extractelt (v4i32 QPR:$src), imm:$lane),
|
||||
(VGETLNi32 (v2i32 (EXTRACT_SUBREG QPR:$src,
|
||||
(DSubReg_i32_reg imm:$lane))),
|
||||
(SubReg_i32_lane imm:$lane))>;
|
||||
def : Pat<(extractelt (v2f32 DPR:$src1), imm:$src2),
|
||||
(EXTRACT_SUBREG DPR:$src1, (SSubReg_f32_reg imm:$src2))>;
|
||||
def : Pat<(extractelt (v4f32 QPR:$src1), imm:$src2),
|
||||
(EXTRACT_SUBREG QPR:$src1, (SSubReg_f32_reg imm:$src2))>;
|
||||
//def : Pat<(extractelt (v2i64 QPR:$src1), imm:$src2),
|
||||
|
25
test/CodeGen/ARM/2009-08-29-ExtractEltf32.ll
Normal file
25
test/CodeGen/ARM/2009-08-29-ExtractEltf32.ll
Normal file
@ -0,0 +1,25 @@
|
||||
; RUN: llvm-as < %s | llc -mattr=+neon
|
||||
target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:32"
|
||||
target triple = "thumbv7-elf"
|
||||
|
||||
define arm_apcscc void @foo() nounwind {
|
||||
entry:
|
||||
%0 = tail call <2 x float> @llvm.arm.neon.vpadd.v2f32(<2 x float> undef, <2 x float> undef) nounwind ; <<2 x float>> [#uses=1]
|
||||
%tmp28 = extractelement <2 x float> %0, i32 0 ; <float> [#uses=1]
|
||||
%1 = fcmp une float %tmp28, 4.900000e+01 ; <i1> [#uses=1]
|
||||
br i1 %1, label %bb, label %bb7
|
||||
|
||||
bb: ; preds = %entry
|
||||
unreachable
|
||||
|
||||
bb7: ; preds = %entry
|
||||
br i1 undef, label %bb8, label %bb9
|
||||
|
||||
bb8: ; preds = %bb7
|
||||
unreachable
|
||||
|
||||
bb9: ; preds = %bb7
|
||||
ret void
|
||||
}
|
||||
|
||||
declare <2 x float> @llvm.arm.neon.vpadd.v2f32(<2 x float>, <2 x float>) nounwind readnone
|
Loading…
x
Reference in New Issue
Block a user