summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Add the isunordered intrinsic.Alkis Evlogimenos2004-06-123-1/+18
| | | | llvm-svn: 14159
* Implement tracking of bytecode instruction size and the number of longReid Spencer2004-06-114-0/+32
| | | | | | instructions generated. llvm-svn: 14154
* Fix fallout from getOffsetOfLocalArea() being negated. Debugging dumps were ↵Chris Lattner2004-06-112-3/+3
| | | | | | | | | being printed incorrectly, and we were reserving 8 extra bytes of stack space for functions on X86. llvm-svn: 14152
* llvm.isnan doesn't access memoryChris Lattner2004-06-111-1/+1
| | | | llvm-svn: 14151
* Constant fold the isnan intrinsicChris Lattner2004-06-111-1/+10
| | | | llvm-svn: 14150
* By far, one of the most common uses of isnan is to make 'isunordered'Chris Lattner2004-06-111-14/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | comparisons. In an 'isunordered' predicate, which looks like this at the LLVM level: %a = call bool %llvm.isnan(double %X) %b = call bool %llvm.isnan(double %Y) %COM = or bool %a, %b We used to generate this code: fxch %ST(1) fucomip %ST(0), %ST(0) setp %AL fucomip %ST(0), %ST(0) setp %AH or %AL, %AH With this patch, we generate this code: fucomip %ST(0), %ST(1) fstp %ST(0) setp %AL Which should make alkis happy. Tested as X86/compare_folding.llx:test1 llvm-svn: 14148
* Fix bug in previous checkinChris Lattner2004-06-111-0/+3
| | | | llvm-svn: 14146
* No really, these are dead nowChris Lattner2004-06-111-2/+0
| | | | llvm-svn: 14145
* Now that compare instructions aren't lumped in with the other twoargfp ↵Chris Lattner2004-06-114-15/+9
| | | | | | | | | instructions, we can get rid of the FpUCOM/FpUCOMi pseudo instructions, which makes stuff simpler and faster. llvm-svn: 14144
* Introduce a new FP instruction type to separate the compare cases from theChris Lattner2004-06-113-12/+13
| | | | | | twoarg cases. llvm-svn: 14143
* Add direct support for the isnan intrinsic, implementing ↵Chris Lattner2004-06-111-9/+22
| | | | | | | | test/Regression/CodeGen/X86/isnan.llx testcase llvm-svn: 14141
* Add support for the setp instructionsChris Lattner2004-06-112-0/+3
| | | | llvm-svn: 14140
* Split compare instruction handling OUT of handleTwoArgFP into handleCompareFP.Chris Lattner2004-06-111-43/+49
| | | | | | | | | | | | This makes the code much simpler, and the two cases really do belong apart. Once we do it, it's pretty obvious how flawed the logic was for A != A case, so I fixed it (fixing PR369). This also uses freeStackSlotAfter instead of inserting an fxchg then popStackAfter'ing in the case where there is a dead result (unlikely, but possible), producing better code. llvm-svn: 14139
* Revert an unneeded interface change to Instruction.hReid Spencer2004-06-112-2/+2
| | | | llvm-svn: 14137
* Fix lowering to work correctlyChris Lattner2004-06-111-3/+12
| | | | llvm-svn: 14134
* I misled Alkis: LLVM should have isnan, not isunordered.Chris Lattner2004-06-113-6/+14
| | | | | | | | isunordered(X, Y) === isnan(X) | isnan(Y) Remove isunordered, add isnan. llvm-svn: 14132
* Turn loads of ConstantPointerNulls into loads of zero... don't spillBrian Gaeke2004-06-111-0/+6
| | | | | | them into the constant pool. llvm-svn: 14128
* Add the isunordered intrinsic.Alkis Evlogimenos2004-06-113-0/+11
| | | | llvm-svn: 14127
* Remove tabs.Reid Spencer2004-06-102-4/+4
| | | | llvm-svn: 14123
* Implement detailed function level data collection and reporting.Reid Spencer2004-06-104-296/+208
| | | | llvm-svn: 14122
* Adjust prototypes to new Handler interface.Reid Spencer2004-06-102-138/+60
| | | | llvm-svn: 14121
* Make the parser deal with functions instead of just function types.Reid Spencer2004-06-104-76/+84
| | | | llvm-svn: 14120
* Doxygenize a comment.Reid Spencer2004-06-101-2/+2
| | | | llvm-svn: 14115
* Implemented the bulk of the functionality. Cleaned up the code.Reid Spencer2004-06-1012-799/+1180
| | | | llvm-svn: 14113
* Fix the prolog epilog code inserter to match the documentation and supportChris Lattner2004-06-101-9/+33
| | | | | | | | targets whose stack grows up. Patch contributed by Vladimir Prus llvm-svn: 14111
* Fix the fixed stack offset, patch contributed by Vladimir PrusChris Lattner2004-06-102-2/+2
| | | | llvm-svn: 14110
* Fix a bug in my checkin from last night that caused miscompilations ofChris Lattner2004-06-101-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 186.crafty, fhourstones and 132.ijpeg. Bugpoint makes really nasty miscompilations embarassingly easy to find. It narrowed it down to the instcombiner and this testcase (from fhourstones): bool %l7153_l4706_htstat_loopentry_2E_4_no_exit_2E_4(int* %i, [32 x int]* %works, int* %tmp.98.out) { newFuncRoot: %tmp.96 = load int* %i ; <int> [#uses=1] %tmp.97 = getelementptr [32 x int]* %works, long 0, int %tmp.96 ; <int*> [#uses=1] %tmp.98 = load int* %tmp.97 ; <int> [#uses=2] %tmp.99 = load int* %i ; <int> [#uses=1] %tmp.100 = and int %tmp.99, 7 ; <int> [#uses=1] %tmp.101 = seteq int %tmp.100, 7 ; <bool> [#uses=2] %tmp.102 = cast bool %tmp.101 to int ; <int> [#uses=0] br bool %tmp.101, label %codeRepl4.exitStub, label %codeRepl3.exitStub codeRepl4.exitStub: ; preds = %newFuncRoot store int %tmp.98, int* %tmp.98.out ret bool true codeRepl3.exitStub: ; preds = %newFuncRoot store int %tmp.98, int* %tmp.98.out ret bool false } ... which only has one combination performed on it: $ llvm-as < t.ll | opt -instcombine -debug | llvm-dis IC: Old = %tmp.101 = seteq int %tmp.100, 7 ; <bool> [#uses=1] New = setne int %tmp.100, 0 ; <bool>:<badref> [#uses=0] IC: MOD = br bool %tmp.101, label %codeRepl3.exitStub, label %codeRepl4.exitStub IC: MOD = %tmp.97 = getelementptr [32 x int]* %works, uint 0, int %tmp.96 ; <int*> [#uses=1] It doesn't get much better than this. :) llvm-svn: 14109
* More minor cleanupsChris Lattner2004-06-101-11/+8
| | | | llvm-svn: 14108
* Eliminate many occurrances of Instruction::Chris Lattner2004-06-101-134/+112
| | | | llvm-svn: 14107
* Share some codeChris Lattner2004-06-101-11/+3
| | | | llvm-svn: 14106
* Tolerate more errorsChris Lattner2004-06-091-1/+2
| | | | llvm-svn: 14104
* Encode %fsr correctly; don't fail an assertion.Brian Gaeke2004-06-091-0/+9
| | | | llvm-svn: 14103
* Fix encoding of ST*FSR instructions.Brian Gaeke2004-06-091-7/+7
| | | | llvm-svn: 14102
* Fix assertion failure message to have the right method name.Brian Gaeke2004-06-091-1/+1
| | | | llvm-svn: 14101
* Make the asmwriter much more tolerant of errors (which are common when workingChris Lattner2004-06-091-16/+23
| | | | | | on new front-ends and stuff). Also get rid of some tabs that snuck in. llvm-svn: 14100
* Made it possible for the printInfoComment method to invoke getSlot inReid Spencer2004-06-091-17/+16
| | | | | | | such a way that if the Value being printed is standalone that we don't assert and abort but just print ":??" for the slot number instead. llvm-svn: 14097
* Fix for PR#366. We use getClassB() so that we can handle cast instructionsJohn Criswell2004-06-091-1/+1
| | | | | | that cast to bool. llvm-svn: 14096
* Implement InstCombine/select.ll:test15*Chris Lattner2004-06-091-40/+90
| | | | llvm-svn: 14095
* Cleanup alignment of output.Reid Spencer2004-06-092-28/+28
| | | | llvm-svn: 14093
* Implement analysis output. Don't dump function details unless requested.Reid Spencer2004-06-092-2/+40
| | | | llvm-svn: 14091
* Implement some rudimentary analysis.Reid Spencer2004-06-092-6/+94
| | | | llvm-svn: 14090
* Clean up indentation of file body output.Reid Spencer2004-06-092-18/+20
| | | | | | Don't dump functions unless "detailedResults" is requested. llvm-svn: 14089
* Move parsing details to Parser.cpp.Reid Spencer2004-06-092-50/+0
| | | | llvm-svn: 14088
* Bring some things out of header files that belong only in this file.Reid Spencer2004-06-092-0/+42
| | | | llvm-svn: 14087
* Be more careful about the order we put stuff onto the worklist. This allow ↵Chris Lattner2004-06-091-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | us to collapse this: bool %le(int %A, int %B) { %c1 = setgt int %A, %B %tmp = select bool %c1, int 1, int 0 %c2 = setlt int %A, %B %result = select bool %c2, int -1, int %tmp %c3 = setle int %result, 0 ret bool %c3 } into: bool %le(int %A, int %B) { %c3 = setle int %A, %B ; <bool> [#uses=1] ret bool %c3 } which is handy, because the Java FE makes these sequences all over the place. This is tested as: test/Regression/Transforms/InstCombine/JavaCompare.ll llvm-svn: 14086
* Cleaned up a dead header file to prevent duplicate definition warningsReid Spencer2004-06-091-1/+1
| | | | | | in doxygen. llvm-svn: 14084
* Implement select.ll:test14*Chris Lattner2004-06-091-35/+59
| | | | llvm-svn: 14083
* Workaround or a VS miscompilation bugChris Lattner2004-06-081-1/+1
| | | | llvm-svn: 14078
* Don't grab the condition of unconditional branches!Chris Lattner2004-06-081-7/+8
| | | | | | This fixes PR363 llvm-svn: 14076
* Fix a minor bug in the map - since this pass adds a global symbol, it must beBrian Gaeke2004-06-081-0/+4
| | | | | | accounted for in the map (at least, in its current format). llvm-svn: 14075
OpenPOWER on IntegriCloud