<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0508</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2026-02-16</periodOfReport>

    <issuer>
        <issuerCik>0000855658</issuerCik>
        <issuerName>LATTICE SEMICONDUCTOR CORP</issuerName>
        <issuerTradingSymbol>LSCC</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001756011</rptOwnerCik>
            <rptOwnerName>Elashmawi Esam</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>5555 NE MOORE COURT</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>HILLSBORO</rptOwnerCity>
            <rptOwnerState>OR</rptOwnerState>
            <rptOwnerZipCode>97124</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isOfficer>1</isOfficer>
            <officerTitle>SVP Mktg &amp; Strategy</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>0</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2026-02-16</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>F</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
                <footnoteId id="F1"/>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>594</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>97.63</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>316227</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">These shares were retained by the Issuer in order to meet the tax withholding obligations of the Reporting Person in connection with the vesting of an installment of the restricted stock units. The amount retained by the Issuer was not in excess of the amount of the tax liability.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Tracy Feanny, Attorney in Fact For: Esam Elashmawi</signatureName>
        <signatureDate>2026-02-17</signatureDate>
    </ownerSignature>
</ownershipDocument>
