1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
Commit Graph

11 Commits

Author SHA1 Message Date
Nick Lewycky
5c854580b2 Teach PatternMatch that splat vectors could be floating point as well as
integer. Fixes PR9228!

llvm-svn: 125613
2011-02-15 23:13:23 +00:00
Chris Lattner
a59eb7c09c Rename ValueRequiresCast to ShouldOptimizeCast, to better reflect
what it does.  Enhance it to return false to optimizing vector
sign extensions from vector comparisions, which is the idiom used
to get a splatted vector for a vector comparison.

Doing this breaks vector-casts.ll, add some compensating 
transformations to handle the important case they cover without
depending on this canonicalization.

This fixes rdar://7434900 a serious pessimization of vector compares.

llvm-svn: 95855
2010-02-11 06:26:33 +00:00
Dan Gohman
205b641954 Change tests from "opt %s" to "opt < %s" so that opt doesn't see the
input filename so that opt doesn't print the input filename in the
output so that grep lines in the tests don't unintentionally match
strings in the input filename.

llvm-svn: 81537
2009-09-11 18:01:28 +00:00
Dan Gohman
c95df8b6d8 Use opt -S instead of piping bitcode output through llvm-dis.
llvm-svn: 81257
2009-09-08 22:34:10 +00:00
Dan Gohman
8d84372836 Change these tests to feed the assembly files to opt directly, instead
of using llvm-as, now that opt supports this.

llvm-svn: 81226
2009-09-08 16:50:01 +00:00
Chris Lattner
0426853d67 merge vector-casts-0.ll into vector-casts.ll
llvm-svn: 76864
2009-07-23 05:33:39 +00:00
Chris Lattner
c687344f0c Make some existing optimizations that would only trigger on scalars
also apply to vectors.  This allows us to compile this:

#include <emmintrin.h>
__m128i a(__m128 a, __m128 b) { return a==a & b==b; }
__m128i b(__m128 a, __m128 b) { return a!=a | b!=b; }

to:

_a:
	cmpordps	%xmm1, %xmm0
	ret
_b:
	cmpunordps	%xmm1, %xmm0
	ret

with clang instead of to a ton of horrible code.

llvm-svn: 76863
2009-07-23 05:32:17 +00:00
Chris Lattner
f4474da353 convert a test to filecheck format. This fixes an endemic problem
with negative tests: this test wasn't checking what it thought it was
because it was grepping .bc, not .ll.

llvm-svn: 76861
2009-07-23 05:27:48 +00:00
Chris Lattner
7061a4300d rename test
llvm-svn: 76860
2009-07-23 05:25:12 +00:00
Dan Gohman
54bbef1525 Generalize a few more instcombines to be vector/scalar-independent.
llvm-svn: 73541
2009-06-16 19:55:29 +00:00
Dan Gohman
2e737ac21f Support vector casts in more places, fixing a variety of assertion
failures.

To support this, add some utility functions to Type to help support
vector/scalar-independent code. Change ConstantInt::get and
ConstantFP::get to support vector types, and add an overload to
ConstantInt::get that uses a static IntegerType type, for
convenience.

Introduce a new getConstant method for ScalarEvolution, to simplify
common use cases.

llvm-svn: 73431
2009-06-15 22:12:54 +00:00