llvm-6502/lib
Chris Lattner 93798daa3e Teach FoldBitCast to be able to handle bitcasts from (e.g.) i128 -> <4 x float>.
This allows us to simplify this:
union vec2d {
    double e[2];
    double v __attribute__((vector_size(16)));
};
typedef union vec2d vec2d;

static vec2d a={{1,2}}, b={{3,4}};
    
vec2d foo () {
    return (vec2d){ .v = a.v + b.v * (vec2d){{5,5}}.v };
}

down to:

define %0 @foo() nounwind ssp {
entry:
  %mrv5 = insertvalue %0 undef, double 1.600000e+01, 0 ; <%0> [#uses=1]
  %mrv6 = insertvalue %0 %mrv5, double 2.200000e+01, 1 ; <%0> [#uses=1]
  ret %0 %mrv6
}

instead of:

define %0 @foo() nounwind ssp {
entry:
  %mrv5 = insertvalue %0 undef, double extractelement (<2 x double> fadd (<2 x double> fmul (<2 x double> bitcast (<1 x i128> <i128 85174437667405312423031577302488055808> to <2 x double>), <2 x double> <double 3.000000e+00, double 4.000000e+00>), <2 x double> <double 1.000000e+00, double 2.000000e+00>), i32 0), 0 ; <%0> [#uses=1]
  %mrv6 = insertvalue %0 %mrv5, double extractelement (<2 x double> fadd (<2 x double> fmul (<2 x double> bitcast (<1 x i128> <i128 85174437667405312423031577302488055808> to <2 x double>), <2 x double> <double 3.000000e+00, double 4.000000e+00>), <2 x double> <double 1.000000e+00, double 2.000000e+00>), i32 1), 1 ; <%0> [#uses=1]
  ret %0 %mrv6
}



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85040 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-25 06:15:37 +00:00
..
Analysis Teach FoldBitCast to be able to handle bitcasts from (e.g.) i128 -> <4 x float>. 2009-10-25 06:15:37 +00:00
Archive Prune #includes from llvm/Linker.h and llvm/System/Path.h, 2009-08-23 22:45:37 +00:00
AsmParser Auto-upgrade free instructions to calls to the builtin free function. 2009-10-24 04:23:03 +00:00
Bitcode Auto-upgrade free instructions to calls to the builtin free function. 2009-10-24 04:23:03 +00:00
CodeGen When the scavenger is looking for a good candidate location to restore from a 2009-10-25 00:45:07 +00:00
CompilerDriver First draft of the OptionPreprocessor. 2009-10-17 20:09:29 +00:00
ExecutionEngine Fix http://llvm.org/PR4822: allow module deletion after a function has been 2009-10-23 22:37:43 +00:00
Linker Remove unnecessary #include. 2009-09-12 22:24:25 +00:00
MC add a twine version of MCContext::GetOrCreateSymbol. 2009-10-19 22:49:00 +00:00
Support Commit fixes for half precision I noted in review, so 2009-10-23 04:02:51 +00:00
System Use 'waitpid' instead of 'wait'. Basing Program::Wait() on 'wait()' prevents it being correct within a multithreaded context. 2009-10-22 22:16:17 +00:00
Target Remove ICmpInst::isSignedPredicate which was a reimplementation 2009-10-25 05:20:17 +00:00
Transforms Remove ICmpInst::isSignedPredicate which was a reimplementation 2009-10-25 05:20:17 +00:00
VMCore Remove ICmpInst::isSignedPredicate which was a reimplementation 2009-10-25 05:20:17 +00:00
Makefile remove llvm-db: it is completely broken and if anyone wants to do a debugger, 2009-10-05 02:29:51 +00:00