[PATCH] D38756: [x86] use an insert op to put one variable element into a constant of vectors
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 10 12:29:49 PDT 2017
spatel created this revision.
Herald added a subscriber: mcrosier.
Instead of loading (a potential ton of) scalar constants, load those as a vector and then insert into it.
I don't know how to solve the FP cases, so I'm posting this as-is to see if anyone else has ideas or if I've just approached this in the wrong way. I stepped through the FP examples, and we show something like this:
Legalizing: t6: f32 = ConstantFP<3.000000e+00>
Trying to expand node
Succesfully expanded node
... replacing: t6: f32 = ConstantFP<3.000000e+00>
with: t22: f32,ch = load<LD4[ConstantPool]> t0, ConstantPool:i64<float 3.000000e+00> 0, undef:i64
This doesn't happen with int constants...because int constants are legal but FP constants are not? I looked at creating target FP constants instead, but that can cause crashing for reasons I haven't tracked down yet.
https://reviews.llvm.org/D38756
Files:
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/insert-into-constant-vector.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38756.118384.patch
Type: text/x-patch
Size: 52358 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171010/222967b2/attachment.bin>
More information about the llvm-commits
mailing list