-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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 coverage
Metadata
Metadata
Assignees
Labels
good first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contributellvm:support