aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* llvm.isnan doesn't access memoryChris Lattner2004-06-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14151 91177308-0d34-0410-b5e6-96231b3b80d8
* Constant fold the isnan intrinsicChris Lattner2004-06-111-1/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14150 91177308-0d34-0410-b5e6-96231b3b80d8
* Add tests for isnanChris Lattner2004-06-111-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14149 91177308-0d34-0410-b5e6-96231b3b80d8
* By far, one of the most common uses of isnan is to make 'isunordered'Chris Lattner2004-06-112-28/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14148 91177308-0d34-0410-b5e6-96231b3b80d8
* Test that the X86 backend is only emitting one fucom instructionChris Lattner2004-06-111-0/+11
| | | | | | | for each 'COM =' line. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14147 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug in previous checkinChris Lattner2004-06-112-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14146 91177308-0d34-0410-b5e6-96231b3b80d8
* No really, these are dead nowChris Lattner2004-06-111-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14145 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that compare instructions aren't lumped in with the other twoargfp ↵Chris Lattner2004-06-116-27/+15
| | | | | | | | | | instructions, we can get rid of the FpUCOM/FpUCOMi pseudo instructions, which makes stuff simpler and faster. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14144 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce a new FP instruction type to separate the compare cases from theChris Lattner2004-06-114-18/+15
| | | | | | | twoarg cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14143 91177308-0d34-0410-b5e6-96231b3b80d8
* Bug fixed, new featureChris Lattner2004-06-111-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14142 91177308-0d34-0410-b5e6-96231b3b80d8
* Add direct support for the isnan intrinsic, implementing ↵Chris Lattner2004-06-112-18/+44
| | | | | | | | | test/Regression/CodeGen/X86/isnan.llx testcase git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14141 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the setp instructionsChris Lattner2004-06-112-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14140 91177308-0d34-0410-b5e6-96231b3b80d8
* Split compare instruction handling OUT of handleTwoArgFP into handleCompareFP.Chris Lattner2004-06-112-86/+98
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14139 91177308-0d34-0410-b5e6-96231b3b80d8
* Change tags rule to pipe output from find through etags command so that itReid Spencer2004-06-111-1/+1
| | | | | | | doesn't break on machines with limited command line lengths. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14138 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert an unneeded interface change to Instruction.hReid Spencer2004-06-113-4/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14137 91177308-0d34-0410-b5e6-96231b3b80d8
* Testcase for PR369Chris Lattner2004-06-111-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14136 91177308-0d34-0410-b5e6-96231b3b80d8
* Check to make sure that isnan doesn't require calling a functionChris Lattner2004-06-111-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14135 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix lowering to work correctlyChris Lattner2004-06-112-6/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14134 91177308-0d34-0410-b5e6-96231b3b80d8
* I misled Alkis: LLVM should have isnan, not isunordered.Chris Lattner2004-06-111-6/+7
| | | | | | | | | | | isunordered(X, Y) === isnan(X) | isnan(Y) Remove isunordered, add isnan. Modernize testcase git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14133 91177308-0d34-0410-b5e6-96231b3b80d8
* I misled Alkis: LLVM should have isnan, not isunordered.Chris Lattner2004-06-115-14/+22
| | | | | | | | | isunordered(X, Y) === isnan(X) | isnan(Y) Remove isunordered, add isnan. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14132 91177308-0d34-0410-b5e6-96231b3b80d8
* Document the llvm.isnan intrinsicChris Lattner2004-06-111-2/+38
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14131 91177308-0d34-0410-b5e6-96231b3b80d8
* Bug fixed.Brian Gaeke2004-06-111-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14130 91177308-0d34-0410-b5e6-96231b3b80d8
* Test case for PR368Brian Gaeke2004-06-111-0/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14129 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn loads of ConstantPointerNulls into loads of zero... don't spillBrian Gaeke2004-06-111-0/+6
| | | | | | | them into the constant pool. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14128 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the isunordered intrinsic.Alkis Evlogimenos2004-06-115-1/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14127 91177308-0d34-0410-b5e6-96231b3b80d8
* Add feature test for llvm intrinsics. It currently contains only the ↵Alkis Evlogimenos2004-06-111-0/+12
| | | | | | "isunordered" intrinsic git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14126 91177308-0d34-0410-b5e6-96231b3b80d8
* Updated the BytecodeAnalysis data structure to contain additional fieldsReid Spencer2004-06-101-3/+9
| | | | | | | needed for analysis of individual functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14125 91177308-0d34-0410-b5e6-96231b3b80d8
* Added an isPhiNode(unsigned) static method to determine if an opcode isReid Spencer2004-06-101-0/+2
| | | | | | | a PhiNode or not. Needed by Bytecode Analyzer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14124 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove tabs.Reid Spencer2004-06-102-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14123 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement detailed function level data collection and reporting.Reid Spencer2004-06-104-296/+208
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14122 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust prototypes to new Handler interface.Reid Spencer2004-06-102-138/+60
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14121 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the parser deal with functions instead of just function types.Reid Spencer2004-06-104-76/+84
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14120 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up documentation and naming of variables.Reid Spencer2004-06-101-12/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14119 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove extra space.Misha Brukman2004-06-101-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14117 91177308-0d34-0410-b5e6-96231b3b80d8
* Doxygenize a comment.Reid Spencer2004-06-101-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14115 91177308-0d34-0410-b5e6-96231b3b80d8
* Made detailed output the default and changed -details option to -nodetails.Reid Spencer2004-06-101-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14114 91177308-0d34-0410-b5e6-96231b3b80d8
* Implemented the bulk of the functionality. Cleaned up the code.Reid Spencer2004-06-1013-808/+1202
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14113 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow dates with slashes in them in $DateRE.Brian Gaeke2004-06-101-1/+2
| | | | | | | Don't match on $Filename (which will be unset) if we hit 'UNMATCHABLE:'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14112 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14111 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the fixed stack offset, patch contributed by Vladimir PrusChris Lattner2004-06-102-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14110 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14109 91177308-0d34-0410-b5e6-96231b3b80d8
* More minor cleanupsChris Lattner2004-06-101-11/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14108 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate many occurrances of Instruction::Chris Lattner2004-06-101-134/+112
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14107 91177308-0d34-0410-b5e6-96231b3b80d8
* Share some codeChris Lattner2004-06-101-11/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14106 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new BinaryOperator::createAdd/Sub/... methods to avoid having to typeChris Lattner2004-06-101-0/+16
| | | | | | | llvm::Instruction:: all of the time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14105 91177308-0d34-0410-b5e6-96231b3b80d8
* Tolerate more errorsChris Lattner2004-06-091-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14104 91177308-0d34-0410-b5e6-96231b3b80d8
* Encode %fsr correctly; don't fail an assertion.Brian Gaeke2004-06-091-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14103 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix encoding of ST*FSR instructions.Brian Gaeke2004-06-091-7/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14102 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix assertion failure message to have the right method name.Brian Gaeke2004-06-091-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14101 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14100 91177308-0d34-0410-b5e6-96231b3b80d8