-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Closed
Labels
good first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contributellvm:support
Description
- Move implementations from SelectionDAG.cpp FoldValue into APInt.h APIntOps
llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Lines 6024 to 6047 in deff460
case ISD::AVGFLOORS: { unsigned FullWidth = C1.getBitWidth() + 1; APInt C1Ext = C1.sext(FullWidth); APInt C2Ext = C2.sext(FullWidth); return (C1Ext + C2Ext).extractBits(C1.getBitWidth(), 1); } case ISD::AVGFLOORU: { unsigned FullWidth = C1.getBitWidth() + 1; APInt C1Ext = C1.zext(FullWidth); APInt C2Ext = C2.zext(FullWidth); return (C1Ext + C2Ext).extractBits(C1.getBitWidth(), 1); } case ISD::AVGCEILS: { unsigned FullWidth = C1.getBitWidth() + 1; APInt C1Ext = C1.sext(FullWidth); APInt C2Ext = C2.sext(FullWidth); return (C1Ext + C2Ext + 1).extractBits(C1.getBitWidth(), 1); } case ISD::AVGCEILU: { unsigned FullWidth = C1.getBitWidth() + 1; APInt C1Ext = C1.zext(FullWidth); APInt C2Ext = C2.zext(FullWidth); return (C1Ext + C2Ext + 1).extractBits(C1.getBitWidth(), 1); } Add APIntTest unit test coverageTo pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Metadata
Metadata
Assignees
Labels
good first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contributellvm:support
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
llvmbot commentedon Mar 6, 2024
Hi!
This issue may be a good introductory issue for people new to working on LLVM. If you would like to work on this issue, your first steps are:
test/
create fine-grained testing targets, so you can e.g. usemake check-clang-ast
to only run Clang's AST tests.git clang-format HEAD~1
to format your changes.If you have any further questions about this issue, don't hesitate to ask via a comment in the thread below.
llvmbot commentedon Mar 6, 2024
@llvm/issue-subscribers-good-first-issue
Author: Simon Pilgrim (RKSimon)
Atousa commentedon Mar 6, 2024
@RKSimon I am interested in working on this issue. Please assign it to me.
EugeneZelenko commentedon Mar 6, 2024
@Atousa: Just create pull request and mention it on this page.
[ADT] Add implementations for avgFloor and avgCeil to APInt (#84431)