Commit Graph

13632 Commits

Author SHA1 Message Date
Chris Lattner 098c01e94e Codegen shufflevector as VVECTOR_SHUFFLE
llvm-svn: 27529
2006-04-08 04:15:24 +00:00
Chris Lattner 101ea66813 add a sanity check: LegalizeOp should return a value that is the same type
as its input.

llvm-svn: 27528
2006-04-08 04:13:17 +00:00
Chris Lattner fc72a6b72d use isValidOperands instead of duplicating checks
llvm-svn: 27527
2006-04-08 04:09:19 +00:00
Chris Lattner 931565caf6 Regenerate
llvm-svn: 27526
2006-04-08 04:09:02 +00:00
Chris Lattner 80f554f209 Use isValidOperands instead of duplicating or eliding checks.
llvm-svn: 27525
2006-04-08 04:08:32 +00:00
Chris Lattner 38c4cb2f9e Use the isValidOperands helper instead of duplicating checking code
llvm-svn: 27524
2006-04-08 04:07:52 +00:00
Chris Lattner 54865b39ab Add methods to check insertelement/extractelement instructions for validity,
check validity when instructions are created.

llvm-svn: 27523
2006-04-08 04:05:48 +00:00
Chris Lattner aebccf891a regenerate
llvm-svn: 27521
2006-04-08 03:55:17 +00:00
Chris Lattner 8c32ad0040 Add insertelement and shufflevector constantexpr support
llvm-svn: 27520
2006-04-08 03:53:34 +00:00
Evan Cheng 78e3d565af INSERT_VECTOR_ELT lowering bug:
store vector to $esp
  store element to $esp + sizeof(VT) * index
  load  vector from $esp
The bug is VT is the type of the vector element, not the type of the vector!

llvm-svn: 27517
2006-04-08 01:46:37 +00:00
Chris Lattner 0197e454d1 Add shufflevector support
llvm-svn: 27515
2006-04-08 01:19:47 +00:00
Chris Lattner aa3185f12e Stub out shufflevector
llvm-svn: 27514
2006-04-08 01:19:25 +00:00
Chris Lattner 17bd60588c Add supprot for shufflevector
llvm-svn: 27513
2006-04-08 01:19:12 +00:00
Chris Lattner 9ff96a70f2 regenerate
llvm-svn: 27512
2006-04-08 01:18:56 +00:00
Chris Lattner 8ec3c2e31f Parse shufflevector
llvm-svn: 27511
2006-04-08 01:18:35 +00:00
Chris Lattner bbe0a4248b Add shufflevector support, todo, implement better constant folding.
llvm-svn: 27510
2006-04-08 01:18:18 +00:00
Chris Lattner 161e7cfc17 Add shufflevector reading support
llvm-svn: 27509
2006-04-08 01:17:59 +00:00
Evan Cheng 0df9c9f57d ldmxcsr and stmxcsr.
llvm-svn: 27506
2006-04-08 00:47:44 +00:00
Jim Laskey 7d4592733c Remove section change in function end, preventing override of function's real
section.

llvm-svn: 27503
2006-04-08 00:35:59 +00:00
Evan Cheng ac847268c5 Code clean up.
llvm-svn: 27501
2006-04-07 21:53:05 +00:00
Evan Cheng aa18a52545 Added patterns for MOVHPSmr and MOVLPSmr.
llvm-svn: 27497
2006-04-07 21:20:58 +00:00
Evan Cheng 748e573ce5 Keep track of an Mac OS X / x86 ABI bug.
llvm-svn: 27496
2006-04-07 21:19:53 +00:00
Jim Laskey c0d6518f27 Make sure that debug labels are defined within the same section and after the
entry point of a function.

llvm-svn: 27494
2006-04-07 20:44:42 +00:00
Jim Laskey 2d7298c362 Foundation for call frame information.
llvm-svn: 27491
2006-04-07 16:34:46 +00:00
Chris Lattner 92b1a57010 We have an assertion that checks that we do not encode null values into the
.bc file if they are supposed to be implicit.  This is cool, except that it
checked *after* constant expr folding: improving constant expr folding could
cause the .bc reader to assert out on old .bc files.  Move the check so that
it checks all simple constants, but no constantexprs.

llvm-svn: 27480
2006-04-07 05:00:02 +00:00
Chris Lattner e4f9d7b23c Constant fold extractelement(zero, x) -> zero
llvm-svn: 27479
2006-04-07 04:44:06 +00:00
Chris Lattner 8ec0205de4 Fix inlining of insert/extract element constantexprs
llvm-svn: 27478
2006-04-07 04:41:03 +00:00
Evan Cheng 5c349b8b7d Add code to RemapOperand() to handle Instruction::ExtractElement and
Instruction::InsertElement.

llvm-svn: 27477
2006-04-07 01:27:42 +00:00
Evan Cheng d8e1a01be6 A MOVPS2SSmr, i.e. _mm_store_ss, encoding bug.
Also MOVPDI2DIrr.

llvm-svn: 27476
2006-04-06 23:53:29 +00:00
Evan Cheng c995b45f67 - movlp{s|d} and movhp{s|d} support.
- Normalize shuffle nodes so result vector lower half elements come from the
  first vector, the rest come from the second vector. (Except for the
  exceptions :-).
- Other minor fixes.

llvm-svn: 27474
2006-04-06 23:23:56 +00:00
Evan Cheng acf8b3c828 New entries.
llvm-svn: 27473
2006-04-06 23:21:24 +00:00
Evan Cheng 613996c55e 1. If both vector operands of a vector_shuffle are undef, turn it into an undef.
2. A shuffle mask element can also be an undef.

llvm-svn: 27472
2006-04-06 23:20:43 +00:00
Andrew Lenharth 1596a1b276 This may be overconservative, but it lets the new cfe compile
llvm-svn: 27471
2006-04-06 23:18:45 +00:00
Chris Lattner e61cfad815 Add an item
llvm-svn: 27470
2006-04-06 23:16:19 +00:00
Chris Lattner 466841ddc7 Make sure to return the result in the right type.
llvm-svn: 27469
2006-04-06 23:12:19 +00:00
Andrew Lenharth 477169e36a Move this to lib/Analysis.
This reduces Core size, yay.

llvm-svn: 27468
2006-04-06 22:58:58 +00:00
Chris Lattner a4bbfaed5c Match vpku[hw]um(x,x).
Convert vsldoi(x,x) to work the same way other (x,x) cases work.

llvm-svn: 27467
2006-04-06 22:28:36 +00:00
Chris Lattner f38e033270 Add support for matching vmrg(x,x) patterns
llvm-svn: 27463
2006-04-06 22:02:42 +00:00
Andrew Lenharth cee782d514 fix some linking problems with the new gcc
llvm-svn: 27460
2006-04-06 21:26:32 +00:00
Chris Lattner d1dcb52093 Pattern match vmrg* instructions, which are now lowered by the CFE into shuffles.
llvm-svn: 27457
2006-04-06 21:11:54 +00:00
Chris Lattner a4c727f1cc remove two done items
llvm-svn: 27453
2006-04-06 19:19:38 +00:00
Chris Lattner e79d249c29 Lower vperm(x,y, mask) -> shuffle(x,y,mask) if mask is constant. This allows
us to compile oh-so-realistic stuff like this:

 vec_vperm(A, B, (vector unsigned char){14});

to:
        vspltb v0, v0, 14

instead of:

        vspltisb v0, 14
        vperm v0, v2, v1, v0

llvm-svn: 27452
2006-04-06 19:19:17 +00:00
Chris Lattner 1d33819194 Support pattern matching vsldoi(x,y) and vsldoi(x,x), which allows the f.e. to
lower it and LLVM to have one fewer intrinsic.  This implements
CodeGen/PowerPC/vec_shuffle.ll

llvm-svn: 27450
2006-04-06 18:26:28 +00:00
Chris Lattner e8b83b4206 Compile the vpkuhum/vpkuwum intrinsics into vpkuhum/vpkuwum instead of into
vperm with a perm mask lvx'd from the constant pool.

llvm-svn: 27448
2006-04-06 17:23:16 +00:00
Evan Cheng 695e45c252 POR encoded as PAND, yikes.
llvm-svn: 27446
2006-04-06 01:49:20 +00:00
Evan Cheng dddb688a40 An entry about comi / ucomi intrinsics.
llvm-svn: 27445
2006-04-05 23:46:04 +00:00
Evan Cheng 780382946e Support for comi / ucomi intrinsics.
llvm-svn: 27444
2006-04-05 23:38:46 +00:00
Chris Lattner c94d932447 Add all of the data stream intrinsics and instructions. woo
llvm-svn: 27442
2006-04-05 22:27:14 +00:00
Chris Lattner 39dc64c955 Fix a typo
llvm-svn: 27440
2006-04-05 20:15:25 +00:00
Chris Lattner 39cc717c65 Fix CodeGen/PowerPC/2006-04-05-splat-ish.ll
llvm-svn: 27439
2006-04-05 17:39:25 +00:00