summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/atom-bypass-slow-division.ll
Commit message (Collapse)AuthorAgeFilesLines
* [X86] Rename tests for bypassing slow division (NFC)Nikolai Bozhenov2017-01-121-245/+0
| | | | | | | | | | | | | | | | | | | For tests on bypassing slow division there's no need to be Atom-specific. The patch renames all tests on division bypassing and makes their names more consistent: atom-bypass-slow-division.ll -> bypass-slow-division-32.ll (tests verifying correctness of divl-to-divb bypassing) atom-bypass-slow-division-64.ll -> bypass-slow-division-64.ll (tests verifying correctness of divq-to-divl bypassing) slow-div.ll -> bypass-slow-division-tune.ll (tests verifying that bypassing is enabled only when appropriate) Differential Revision: https://reviews.llvm.org/D28197 llvm-svn: 291802
* [X86] Update LLC tests for slow division bypassing (NFC)Nikolai Bozhenov2017-01-121-45/+178
| | | | | | | | | | | | Run update_llc_test_checks.py on CodeGen/X86/atom-bypass-slow-division.ll CodeGen/X86/atom-bypass-slow-division-64.ll CodeGen/X86/slow-div.ll Differential Revision: https://reviews.llvm.org/D28469 llvm-svn: 291799
* Mass update to CodeGen tests to use CHECK-LABEL for labels corresponding to ↵Stephen Lin2013-07-141-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | function definitions for more informative error messages. No functionality change and all updated tests passed locally. This update was done with the following bash script: find test/CodeGen -name "*.ll" | \ while read NAME; do echo "$NAME" if ! grep -q "^; *RUN: *llc.*debug" $NAME; then TEMP=`mktemp -t temp` cp $NAME $TEMP sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \ while read FUNC; do sed -i '' "s/;\(.*\)\([A-Za-z0-9_-]*\):\( *\)$FUNC: *\$/;\1\2-LABEL:\3$FUNC:/g" $TEMP done sed -i '' "s/;\(.*\)-LABEL-LABEL:/;\1-LABEL:/" $TEMP sed -i '' "s/;\(.*\)-NEXT-LABEL:/;\1-NEXT:/" $TEMP sed -i '' "s/;\(.*\)-NOT-LABEL:/;\1-NOT:/" $TEMP sed -i '' "s/;\(.*\)-DAG-LABEL:/;\1-DAG:/" $TEMP mv $TEMP $NAME fi done llvm-svn: 186280
* Bypass Slow DividesPreston Gurd2013-03-041-1/+1
| | | | | | | | | | | | | * Only apply divide bypass optimization when not optimizing for size. * Fixed bug caused by constant for 0 value of type Int32, used dividend type to generate the constant instead. * For atom x86-64 apply the divide bypass to use 16-bit divides instead of 64-bit divides when operand values are small enough. * Added lit tests for 64-bit divide bypass. Patch by Tyler Nowicki! llvm-svn: 176442
* llvm/test/CodeGen/X86/atom-bypass-slow-division.ll: Fix possible typo(s) in ↵NAKAMURA Takumi2012-12-121-4/+4
| | | | | | | | CHECK-NOT lines. Found by Alexander Zinenko, thanks! llvm-svn: 169978
* llvm/test/CodeGen/X86/atom-bypass-slow-division.ll: Rename symbols, ↵NAKAMURA Takumi2012-12-121-20/+20
| | | | | | s/test_/Test/g, not to mismatch "CHECK(-NOT): test". llvm-svn: 169977
* Generic Bypass Slow DivPreston Gurd2012-09-041-0/+112
- CodeGenPrepare pass for identifying div/rem ops - Backend specifies the type mapping using addBypassSlowDivType - Enabled only for Intel Atom with O2 32-bit -> 8-bit - Replace IDIV with instructions which test its value and use DIVB if the value is positive and less than 256. - In the case when the quotient and remainder of a divide are used a DIV and a REM instruction will be present in the IR. In the non-Atom case they are both lowered to IDIVs and CSE removes the redundant IDIV instruction, using the quotient and remainder from the first IDIV. However, due to this optimization CSE is not able to eliminate redundant IDIV instructions because they are located in different basic blocks. This is overcome by calculating both the quotient (DIV) and remainder (REM) in each basic block that is inserted by the optimization and reusing the result values when a subsequent DIV or REM instruction uses the same operands. - Test cases check for the presents of the optimization when calculating either the quotient, remainder, or both. Patch by Tyler Nowicki! llvm-svn: 163150
OpenPOWER on IntegriCloud