Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add xarch andn #64350

Merged
merged 5 commits into from
Feb 2, 2022
Merged

Add xarch andn #64350

merged 5 commits into from
Feb 2, 2022

Conversation

Wraith2
Copy link
Contributor

@Wraith2 Wraith2 commented Jan 26, 2022

This adds a lowering for the pattern AND(x, NOT(y)) and AND(NOT(x),y)) using the existing arm specific logic as a base.

The arm specific version is moved into arm specific lowering where it functions unchanged, it generates a GT_AND_NOT node which is later emitted as a BitClear instruction.

The xarch specific version has been added. It generates a new HWIntrinsic node for the andn instruction taking advantage of the support for the instruction already in place in the emitter. The instruction format needed to be added to the whitelist of formats that are recognised as setting the ZF flag to allow the best optimization.

Diffs are improvements. In all cases where the node is used the instruction count is reduced. In cases where the size has increased it is because the andn instruction plus 3 args encoding consumes one more byte than the combination of simpler and followed by not and their args.

aspnet.run.windows.x64.checked.mch:


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 21586326 (overridden on cmd)
Total bytes of diff: 21586263 (overridden on cmd)
Total bytes of delta: -63 (-0.00 % of base)
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file regressions (bytes):
           4 : 51520.dasm (3.03% of base)
           1 : 44444.dasm (0.04% of base)
           1 : 18515.dasm (0.04% of base)
           1 : 19658.dasm (0.04% of base)

Top file improvements (bytes):
         -16 : 54342.dasm (-4.28% of base)
          -4 : 9096.dasm (-0.58% of base)
          -4 : 4052.dasm (-8.00% of base)
          -2 : 53045.dasm (-0.55% of base)
          -1 : 12850.dasm (-3.45% of base)
          -1 : 41513.dasm (-0.06% of base)
          -1 : 61212.dasm (-3.45% of base)
          -1 : 10701.dasm (-1.14% of base)
          -1 : 64291.dasm (-1.79% of base)
          -1 : 18559.dasm (-3.45% of base)
          -1 : 50000.dasm (-1.79% of base)
          -1 : 59338.dasm (-0.04% of base)
          -1 : 18514.dasm (-0.04% of base)
          -1 : 41531.dasm (-3.45% of base)
          -1 : 59350.dasm (-3.45% of base)
          -1 : 63077.dasm (-0.04% of base)
          -1 : 19657.dasm (-0.04% of base)
          -1 : 29363.dasm (-0.04% of base)
          -1 : 63082.dasm (-3.45% of base)
          -1 : 18557.dasm (-1.79% of base)

52 total files with Code Size differences (48 improved, 4 regressed), 4 unchanged.

Top method regressions (bytes):
           4 ( 3.03% of base) : 51520.dasm - RegexParser:ScanOptions():this
           1 ( 0.04% of base) : 44444.dasm - HttpParser`1:ParseHeaders(Http1ParsingHandler,byref):bool:this
           1 ( 0.04% of base) : 18515.dasm - HttpParser`1:ParseHeaders(Http1ParsingHandler,byref):bool:this
           1 ( 0.04% of base) : 19658.dasm - HttpParser`1:ParseHeaders(Http1ParsingHandler,byref):bool:this

Top method improvements (bytes):
         -16 (-4.28% of base) : 54342.dasm - RBTree`1:GetIndexOfPageWithFreeSlot(bool):int:this
          -4 (-0.58% of base) : 9096.dasm - Sha1ForNonSecretPurposes:Drain():this
          -4 (-8.00% of base) : 4052.dasm - ThreadCounts:SetInt16Value(short,ubyte):this
          -2 (-0.55% of base) : 53045.dasm - ChainPal:GetChainStatusInformation(int):ref
          -1 (-0.04% of base) : 59338.dasm - Http1Connection:TakeMessageHeaders(byref,bool):bool:this
          -1 (-0.04% of base) : 18514.dasm - Http1Connection:TakeMessageHeaders(byref,bool):bool:this
          -1 (-0.04% of base) : 63077.dasm - Http1Connection:TakeMessageHeaders(byref,bool):bool:this
          -1 (-0.04% of base) : 19657.dasm - Http1Connection:TakeMessageHeaders(byref,bool):bool:this
          -1 (-0.04% of base) : 29363.dasm - Http1Connection:TakeMessageHeaders(byref,bool):bool:this
          -1 (-0.04% of base) : 61179.dasm - Http1Connection:TakeMessageHeaders(byref,bool):bool:this
          -1 (-0.04% of base) : 23857.dasm - Http1Connection:TakeMessageHeaders(byref,bool):bool:this
          -1 (-0.04% of base) : 44434.dasm - Http1Connection:TakeMessageHeaders(byref,bool):bool:this
          -1 (-0.04% of base) : 50012.dasm - Http1Connection:TakeMessageHeaders(byref,bool):bool:this
          -1 (-0.04% of base) : 57539.dasm - Http1Connection:TakeMessageHeaders(byref,bool):bool:this
          -1 (-0.04% of base) : 64284.dasm - Http1Connection:TakeMessageHeaders(byref,bool):bool:this
          -1 (-0.04% of base) : 41526.dasm - Http1Connection:TakeMessageHeaders(byref,bool):bool:this
          -1 (-1.79% of base) : 64291.dasm - Http1ParsingHandler:OnHeadersComplete(bool):this
          -1 (-1.79% of base) : 50000.dasm - Http1ParsingHandler:OnHeadersComplete(bool):this
          -1 (-1.79% of base) : 18557.dasm - Http1ParsingHandler:OnHeadersComplete(bool):this
          -1 (-1.79% of base) : 59349.dasm - Http1ParsingHandler:OnHeadersComplete(bool):this

Top method regressions (percentages):
           4 ( 3.03% of base) : 51520.dasm - RegexParser:ScanOptions():this
           1 ( 0.04% of base) : 18515.dasm - HttpParser`1:ParseHeaders(Http1ParsingHandler,byref):bool:this
           1 ( 0.04% of base) : 19658.dasm - HttpParser`1:ParseHeaders(Http1ParsingHandler,byref):bool:this
           1 ( 0.04% of base) : 44444.dasm - HttpParser`1:ParseHeaders(Http1ParsingHandler,byref):bool:this

Top method improvements (percentages):
          -4 (-8.00% of base) : 4052.dasm - ThreadCounts:SetInt16Value(short,ubyte):this
         -16 (-4.28% of base) : 54342.dasm - RBTree`1:GetIndexOfPageWithFreeSlot(bool):int:this
          -1 (-3.45% of base) : 12850.dasm - HttpRequestHeaders:OnHeadersComplete():this
          -1 (-3.45% of base) : 61212.dasm - HttpRequestHeaders:OnHeadersComplete():this
          -1 (-3.45% of base) : 18559.dasm - HttpRequestHeaders:OnHeadersComplete():this
          -1 (-3.45% of base) : 41531.dasm - HttpRequestHeaders:OnHeadersComplete():this
          -1 (-3.45% of base) : 59350.dasm - HttpRequestHeaders:OnHeadersComplete():this
          -1 (-3.45% of base) : 63082.dasm - HttpRequestHeaders:OnHeadersComplete():this
          -1 (-3.45% of base) : 57535.dasm - HttpRequestHeaders:OnHeadersComplete():this
          -1 (-3.45% of base) : 29342.dasm - HttpRequestHeaders:OnHeadersComplete():this
          -1 (-3.45% of base) : 19667.dasm - HttpRequestHeaders:OnHeadersComplete():this
          -1 (-3.45% of base) : 50002.dasm - HttpRequestHeaders:OnHeadersComplete():this
          -1 (-3.45% of base) : 64293.dasm - HttpRequestHeaders:OnHeadersComplete():this
          -1 (-3.45% of base) : 23872.dasm - HttpRequestHeaders:OnHeadersComplete():this
          -1 (-3.45% of base) : 44381.dasm - HttpRequestHeaders:OnHeadersComplete():this
          -1 (-1.79% of base) : 64291.dasm - Http1ParsingHandler:OnHeadersComplete(bool):this
          -1 (-1.79% of base) : 50000.dasm - Http1ParsingHandler:OnHeadersComplete(bool):this
          -1 (-1.79% of base) : 18557.dasm - Http1ParsingHandler:OnHeadersComplete(bool):this
          -1 (-1.79% of base) : 59349.dasm - Http1ParsingHandler:OnHeadersComplete(bool):this
          -1 (-1.79% of base) : 19666.dasm - Http1ParsingHandler:OnHeadersComplete(bool):this

52 total methods with Code Size differences (48 improved, 4 regressed), 4 unchanged.


benchmarks.run.windows.x64.checked.mch:


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 13177305 (overridden on cmd)
Total bytes of diff: 13177224 (overridden on cmd)
Total bytes of delta: -81 (-0.00 % of base)
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file regressions (bytes):
           4 : 1240.dasm (3.20% of base)
           2 : 36630.dasm (1.10% of base)
           1 : 35514.dasm (0.17% of base)
           1 : 35530.dasm (0.81% of base)

Top file improvements (bytes):
         -16 : 33641.dasm (-3.25% of base)
         -13 : 35515.dasm (-2.40% of base)
         -12 : 7250.dasm (-2.26% of base)
         -11 : 33688.dasm (-0.66% of base)
          -8 : 34512.dasm (-1.78% of base)
          -8 : 35570.dasm (-0.22% of base)
          -6 : 9736.dasm (-3.17% of base)
          -5 : 6916.dasm (-1.12% of base)
          -4 : 7375.dasm (-36.36% of base)
          -3 : 795.dasm (-0.46% of base)
          -2 : 6587.dasm (-0.57% of base)
          -1 : 4449.dasm (-0.88% of base)

16 total files with Code Size differences (12 improved, 4 regressed), 7 unchanged.

Top method regressions (bytes):
           4 ( 3.20% of base) : 1240.dasm - System.Text.RegularExpressions.RegexParser:ScanOptions():this
           2 ( 1.10% of base) : 36630.dasm - Microsoft.CodeAnalysis.BitVector:set_Item(int,bool):this
           1 ( 0.81% of base) : 35530.dasm - System.Reflection.PortableExecutable.ManagedTextSection:CalculateOffsetToMappedFieldDataStream():int:this
           1 ( 0.17% of base) : 35514.dasm - System.Reflection.PortableExecutable.PEBuilder:Serialize(System.Reflection.Metadata.BlobBuilder):System.Reflection.Metadata.BlobContentId:this

Top method improvements (bytes):
         -16 (-3.25% of base) : 33641.dasm - Microsoft.CodeAnalysis.CSharp.Imports:Complete(System.Threading.CancellationToken):this
         -13 (-2.40% of base) : 35515.dasm - System.Reflection.PortableExecutable.PEBuilder:SerializeSections():System.Collections.Immutable.ImmutableArray`1[SerializedSection]:this
         -12 (-2.26% of base) : 7250.dasm - System.Text.RegularExpressions.Symbolic.BDDAlgebra:CreateSetFromRangeImpl(int,int,int):System.Text.RegularExpressions.Symbolic.BDD:this
         -11 (-0.66% of base) : 33688.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.ModifierUtils:CheckModifiers(int,int,Microsoft.CodeAnalysis.Location,Microsoft.CodeAnalysis.DiagnosticBag,System.Nullable`1[SyntaxTokenList],byref):int
          -8 (-1.78% of base) : 34512.dasm - Microsoft.CodeAnalysis.CSharp.DiagnosticsPass:CheckForBitwiseOrSignExtend(Microsoft.CodeAnalysis.CSharp.BoundExpression,int,Microsoft.CodeAnalysis.CSharp.BoundExpression,Microsoft.CodeAnalysis.CSharp.BoundExpression):this
          -8 (-0.22% of base) : 35570.dasm - System.Reflection.PortableExecutable.PEBuilder:WritePEHeader(System.Reflection.Metadata.BlobBuilder,System.Reflection.PortableExecutable.PEDirectoriesBuilder,System.Collections.Immutable.ImmutableArray`1[SerializedSection]):this
          -6 (-3.17% of base) : 9736.dasm - System.Text.Json.BitStack:PushToArray(bool):this
          -5 (-1.12% of base) : 6916.dasm - System.Number:AssembleFloatingPointBits(byref,long,int,bool):long
          -4 (-36.36% of base) : 7375.dasm - System.Text.RegularExpressions.Symbolic.BV64Algebra:Not(long):long:this
          -3 (-0.46% of base) : 795.dasm - System.Sha1ForNonSecretPurposes:Drain():this
          -2 (-0.57% of base) : 6587.dasm - Internal.Cryptography.Pal.ChainPal:GetChainStatusInformation(int):System.Security.Cryptography.X509Certificates.X509ChainStatus[]
          -1 (-0.88% of base) : 4449.dasm - System.Threading.ManualResetEventSlim:UpdateStateAtomically(int,int):this

Top method regressions (percentages):
           4 ( 3.20% of base) : 1240.dasm - System.Text.RegularExpressions.RegexParser:ScanOptions():this
           2 ( 1.10% of base) : 36630.dasm - Microsoft.CodeAnalysis.BitVector:set_Item(int,bool):this
           1 ( 0.81% of base) : 35530.dasm - System.Reflection.PortableExecutable.ManagedTextSection:CalculateOffsetToMappedFieldDataStream():int:this
           1 ( 0.17% of base) : 35514.dasm - System.Reflection.PortableExecutable.PEBuilder:Serialize(System.Reflection.Metadata.BlobBuilder):System.Reflection.Metadata.BlobContentId:this

Top method improvements (percentages):
          -4 (-36.36% of base) : 7375.dasm - System.Text.RegularExpressions.Symbolic.BV64Algebra:Not(long):long:this
         -16 (-3.25% of base) : 33641.dasm - Microsoft.CodeAnalysis.CSharp.Imports:Complete(System.Threading.CancellationToken):this
          -6 (-3.17% of base) : 9736.dasm - System.Text.Json.BitStack:PushToArray(bool):this
         -13 (-2.40% of base) : 35515.dasm - System.Reflection.PortableExecutable.PEBuilder:SerializeSections():System.Collections.Immutable.ImmutableArray`1[SerializedSection]:this
         -12 (-2.26% of base) : 7250.dasm - System.Text.RegularExpressions.Symbolic.BDDAlgebra:CreateSetFromRangeImpl(int,int,int):System.Text.RegularExpressions.Symbolic.BDD:this
          -8 (-1.78% of base) : 34512.dasm - Microsoft.CodeAnalysis.CSharp.DiagnosticsPass:CheckForBitwiseOrSignExtend(Microsoft.CodeAnalysis.CSharp.BoundExpression,int,Microsoft.CodeAnalysis.CSharp.BoundExpression,Microsoft.CodeAnalysis.CSharp.BoundExpression):this
          -5 (-1.12% of base) : 6916.dasm - System.Number:AssembleFloatingPointBits(byref,long,int,bool):long
          -1 (-0.88% of base) : 4449.dasm - System.Threading.ManualResetEventSlim:UpdateStateAtomically(int,int):this
         -11 (-0.66% of base) : 33688.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.ModifierUtils:CheckModifiers(int,int,Microsoft.CodeAnalysis.Location,Microsoft.CodeAnalysis.DiagnosticBag,System.Nullable`1[SyntaxTokenList],byref):int
          -2 (-0.57% of base) : 6587.dasm - Internal.Cryptography.Pal.ChainPal:GetChainStatusInformation(int):System.Security.Cryptography.X509Certificates.X509ChainStatus[]
          -3 (-0.46% of base) : 795.dasm - System.Sha1ForNonSecretPurposes:Drain():this
          -8 (-0.22% of base) : 35570.dasm - System.Reflection.PortableExecutable.PEBuilder:WritePEHeader(System.Reflection.Metadata.BlobBuilder,System.Reflection.PortableExecutable.PEDirectoriesBuilder,System.Collections.Immutable.ImmutableArray`1[SerializedSection]):this

16 total methods with Code Size differences (12 improved, 4 regressed), 7 unchanged.


coreclr_tests.pmi.windows.x64.checked.mch:


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 127515315 (overridden on cmd)
Total bytes of diff: 127483556 (overridden on cmd)
Total bytes of delta: -31759 (-0.02 % of base)
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file regressions (bytes):
           6 : 216048.dasm (0.04% of base)
           5 : 216026.dasm (45.45% of base)
           3 : 93376.dasm (0.20% of base)
           2 : 215427.dasm (0.43% of base)
           1 : 125315.dasm (5.00% of base)
           1 : 188830.dasm (5.00% of base)
           1 : 18932.dasm (5.00% of base)
           1 : 113879.dasm (5.00% of base)
           1 : 190634.dasm (5.00% of base)
           1 : 230347.dasm (0.43% of base)
           1 : 149367.dasm (5.00% of base)
           1 : 17497.dasm (5.00% of base)
           1 : 195009.dasm (5.00% of base)
           1 : 183258.dasm (5.00% of base)
           1 : 184141.dasm (5.00% of base)
           1 : 185786.dasm (5.00% of base)
           1 : 187439.dasm (5.00% of base)
           1 : 215202.dasm (0.75% of base)
           1 : 216083.dasm (2.17% of base)
           1 : 146747.dasm (5.00% of base)

Top file improvements (bytes):
         -21 : 227695.dasm (-3.55% of base)
         -21 : 227696.dasm (-3.55% of base)
         -21 : 227697.dasm (-3.55% of base)
         -21 : 227633.dasm (-3.25% of base)
         -21 : 227634.dasm (-3.25% of base)
         -21 : 227635.dasm (-3.25% of base)
         -16 : 227692.dasm (-5.50% of base)
         -16 : 227693.dasm (-5.57% of base)
         -16 : 227694.dasm (-5.57% of base)
         -16 : 227630.dasm (-5.57% of base)
         -16 : 227631.dasm (-5.59% of base)
         -16 : 227632.dasm (-5.59% of base)
         -14 : 52421.dasm (-3.27% of base)
         -14 : 52422.dasm (-3.27% of base)
         -14 : 52423.dasm (-3.27% of base)
         -14 : 52424.dasm (-3.27% of base)
         -14 : 48545.dasm (-3.27% of base)
         -14 : 48546.dasm (-3.27% of base)
         -13 : 198906.dasm (-2.89% of base)
         -13 : 198908.dasm (-2.89% of base)

17346 total files with Code Size differences (17303 improved, 43 regressed), 0 unchanged.

Top method regressions (bytes):
           6 ( 0.04% of base) : 216048.dasm - Internal.IL.ILImporter:ImportBasicBlock(BasicBlock):this
           5 (45.45% of base) : 216026.dasm - Internal.IL.ILImporter:ClearPendingPrefix(int):this
           3 ( 0.20% of base) : 93376.dasm - JitTest.Test:Main():int
           2 ( 0.43% of base) : 215427.dasm - Internal.TypeSystem.LayoutInt:AlignUp(Internal.TypeSystem.LayoutInt,Internal.TypeSystem.LayoutInt,Internal.TypeSystem.TargetDetails):Internal.TypeSystem.LayoutInt
           1 ( 2.17% of base) : 216083.dasm - Internal.IL.ILImporter:EndImportingInstruction():this
           1 ( 0.75% of base) : 215202.dasm - Internal.TypeSystem.AlignmentHelper:AlignUp(int,int):int
           1 ( 5.88% of base) : 12220.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(byte,byte):byte
           1 ( 5.00% of base) : 125315.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 188830.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 18932.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 113879.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 190634.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 149367.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 17497.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 195009.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 183258.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 184141.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 185786.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 187439.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 146747.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float

Top method improvements (bytes):
         -21 (-3.55% of base) : 227696.dasm - JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__CompareGreaterThanInt64:RunReflectionScenario_Load():this
         -21 (-3.55% of base) : 227697.dasm - JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__CompareGreaterThanInt64:RunReflectionScenario_LoadAligned():this
         -21 (-3.55% of base) : 227695.dasm - JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__CompareGreaterThanInt64:RunReflectionScenario_UnsafeRead():this
         -21 (-3.25% of base) : 227634.dasm - JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__MultipleSumAbsoluteDifferences:RunReflectionScenario_Load():this
         -21 (-3.25% of base) : 227635.dasm - JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__MultipleSumAbsoluteDifferences:RunReflectionScenario_LoadAligned():this
         -21 (-3.25% of base) : 227633.dasm - JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__MultipleSumAbsoluteDifferences:RunReflectionScenario_UnsafeRead():this
         -16 (-5.57% of base) : 227693.dasm - JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__CompareGreaterThanInt64:RunBasicScenario_Load():this
         -16 (-5.57% of base) : 227694.dasm - JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__CompareGreaterThanInt64:RunBasicScenario_LoadAligned():this
         -16 (-5.50% of base) : 227692.dasm - JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__CompareGreaterThanInt64:RunBasicScenario_UnsafeRead():this
         -16 (-5.59% of base) : 227631.dasm - JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__MultipleSumAbsoluteDifferences:RunBasicScenario_Load():this
         -16 (-5.59% of base) : 227632.dasm - JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__MultipleSumAbsoluteDifferences:RunBasicScenario_LoadAligned():this
         -16 (-5.57% of base) : 227630.dasm - JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__MultipleSumAbsoluteDifferences:RunBasicScenario_UnsafeRead():this
         -14 (-3.27% of base) : 48545.dasm - TestStruct:RunStructFldScenario(JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__MaskLoadDouble):this
         -14 (-3.27% of base) : 52421.dasm - TestStruct:RunStructFldScenario(JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__MaskLoadInt32):this
         -14 (-3.27% of base) : 52423.dasm - TestStruct:RunStructFldScenario(JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__MaskLoadInt64):this
         -14 (-3.27% of base) : 48546.dasm - TestStruct:RunStructFldScenario(JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__MaskLoadSingle):this
         -14 (-3.27% of base) : 52422.dasm - TestStruct:RunStructFldScenario(JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__MaskLoadUInt32):this
         -14 (-3.27% of base) : 52424.dasm - TestStruct:RunStructFldScenario(JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__MaskLoadUInt64):this
         -13 (-2.42% of base) : 227399.dasm - JIT.HardwareIntrinsics.X86.SimpleBinaryOpConvTest__ConvertScalarToVector128SingleSingle:RunReflectionScenario_Load():this
         -13 (-2.42% of base) : 227400.dasm - JIT.HardwareIntrinsics.X86.SimpleBinaryOpConvTest__ConvertScalarToVector128SingleSingle:RunReflectionScenario_LoadAligned():this

Top method regressions (percentages):
           5 (45.45% of base) : 216026.dasm - Internal.IL.ILImporter:ClearPendingPrefix(int):this
           1 ( 7.14% of base) : 12170.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(short,short):short
           1 ( 7.14% of base) : 12227.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(ubyte,ubyte):ubyte
           1 ( 7.14% of base) : 12177.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(ushort,ushort):ushort
           1 ( 5.88% of base) : 12220.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(byte,byte):byte
           1 ( 5.00% of base) : 125315.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 188830.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 18932.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 113879.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 190634.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 149367.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 17497.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 195009.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 183258.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 184141.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 185786.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 187439.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 146747.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 193326.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 12151.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float

Top method improvements (percentages):
          -4 (-40.00% of base) : 12134.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(long,long):long
          -4 (-40.00% of base) : 12141.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(long,long):long
          -1 (-14.29% of base) : 12184.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(int,int):int
          -1 (-14.29% of base) : 12191.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(int,int):int
          -1 (-6.67% of base) : 12233.dasm - DataTable:Align(long,long):long
         -16 (-5.59% of base) : 227631.dasm - JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__MultipleSumAbsoluteDifferences:RunBasicScenario_Load():this
         -16 (-5.59% of base) : 227632.dasm - JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__MultipleSumAbsoluteDifferences:RunBasicScenario_LoadAligned():this
         -16 (-5.57% of base) : 227693.dasm - JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__CompareGreaterThanInt64:RunBasicScenario_Load():this
         -16 (-5.57% of base) : 227694.dasm - JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__CompareGreaterThanInt64:RunBasicScenario_LoadAligned():this
         -16 (-5.57% of base) : 227630.dasm - JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__MultipleSumAbsoluteDifferences:RunBasicScenario_UnsafeRead():this
         -16 (-5.50% of base) : 227692.dasm - JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__CompareGreaterThanInt64:RunBasicScenario_UnsafeRead():this
         -11 (-4.85% of base) : 218969.dasm - TestStruct:RunStructFldScenario(JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__MaskLoadDouble):this
         -11 (-4.85% of base) : 196131.dasm - TestStruct:RunStructFldScenario(JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__MaskLoadInt32):this
         -11 (-4.85% of base) : 196133.dasm - TestStruct:RunStructFldScenario(JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__MaskLoadInt64):this
         -11 (-4.85% of base) : 218970.dasm - TestStruct:RunStructFldScenario(JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__MaskLoadSingle):this
         -11 (-4.85% of base) : 196132.dasm - TestStruct:RunStructFldScenario(JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__MaskLoadUInt32):this
         -11 (-4.85% of base) : 196134.dasm - TestStruct:RunStructFldScenario(JIT.HardwareIntrinsics.X86.SimpleBinaryOpTest__MaskLoadUInt64):this
          -4 (-4.65% of base) : 243015.dasm - FPBehaviorApp.Managed:Truncate(double):double
          -9 (-4.62% of base) : 198733.dasm - JIT.HardwareIntrinsics.X86.SimpleUnaryOpTest__ConvertToVector128Int16Byte:RunBasicScenario_Load():this
          -9 (-4.62% of base) : 198734.dasm - JIT.HardwareIntrinsics.X86.SimpleUnaryOpTest__ConvertToVector128Int16Byte:RunBasicScenario_LoadAligned():this

17346 total methods with Code Size differences (17303 improved, 43 regressed), 0 unchanged.


libraries.pmi.windows.x64.checked.mch:


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 47108531 (overridden on cmd)
Total bytes of diff: 47108360 (overridden on cmd)
Total bytes of delta: -171 (-0.00 % of base)
    diff is an improvement.
    relative diff is a regression.
Detail diffs


Top file regressions (bytes):
           6 : 138026.dasm (20.69% of base)
           6 : 138025.dasm (20.69% of base)
           4 : 228858.dasm (3.20% of base)
           4 : 43388.dasm (23.53% of base)
           3 : 138087.dasm (1.21% of base)
           3 : 138110.dasm (5.17% of base)
           3 : 141565.dasm (0.29% of base)
           3 : 138105.dasm (11.54% of base)
           3 : 43384.dasm (30.00% of base)
           3 : 141330.dasm (0.54% of base)
           3 : 138152.dasm (1.70% of base)
           2 : 27741.dasm (0.26% of base)
           2 : 156738.dasm (0.43% of base)
           2 : 76046.dasm (1.10% of base)
           2 : 101984.dasm (0.15% of base)
           1 : 219907.dasm (0.41% of base)
           1 : 75723.dasm (0.54% of base)
           1 : 215047.dasm (0.13% of base)
           1 : 22935.dasm (0.76% of base)
           1 : 220174.dasm (4.00% of base)

Top file improvements (bytes):
         -18 : 237769.dasm (-1.09% of base)
         -17 : 75717.dasm (-2.11% of base)
         -16 : 42977.dasm (-0.65% of base)
         -16 : 110343.dasm (-4.91% of base)
         -13 : 215017.dasm (-2.40% of base)
         -12 : 110283.dasm (-3.59% of base)
         -12 : 229577.dasm (-2.26% of base)
         -11 : 42162.dasm (-1.60% of base)
          -8 : 151566.dasm (-2.33% of base)
          -8 : 215020.dasm (-0.22% of base)
          -8 : 28026.dasm (-1.74% of base)
          -6 : 147131.dasm (-3.17% of base)
          -6 : 191077.dasm (-0.38% of base)
          -6 : 140182.dasm (-0.12% of base)
          -5 : 126011.dasm (-0.49% of base)
          -5 : 53315.dasm (-0.12% of base)
          -4 : 126180.dasm (-0.51% of base)
          -4 : 179409.dasm (-0.22% of base)
          -4 : 183018.dasm (-8.16% of base)
          -4 : 81283.dasm (-8.16% of base)

89 total files with Code Size differences (50 improved, 39 regressed), 19 unchanged.

Top method regressions (bytes):
           6 (20.69% of base) : 138025.dasm - System.Xml.Xsl.XmlQueryType:get_MaybeEmpty():bool:this
           6 (20.69% of base) : 138026.dasm - System.Xml.Xsl.XmlQueryType:get_MaybeMany():bool:this
           4 (23.53% of base) : 43388.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SymbolCompletionState:get_NextIncompletePart():int:this
           4 ( 3.20% of base) : 228858.dasm - System.Text.RegularExpressions.RegexParser:ScanOptions():this
           3 ( 1.70% of base) : 138152.dasm - FloatingDecimal:InitFromDouble(double):this
           3 (30.00% of base) : 43384.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SymbolCompletionState:get_IncompleteParts():int:this
           3 ( 1.21% of base) : 138087.dasm - SequenceType:Create(System.Xml.Xsl.XmlQueryType,System.Xml.Xsl.XmlQueryCardinality):System.Xml.Xsl.XmlQueryType
           3 ( 0.54% of base) : 141330.dasm - System.Xml.Xsl.IlGen.TailCallAnalyzer:AnalyzeDefinition(System.Xml.Xsl.Qil.QilNode)
           3 ( 0.29% of base) : 141565.dasm - System.Xml.Xsl.IlGen.XmlILVisitor:MatchesNodeKinds(System.Xml.Xsl.Qil.QilTargetType,System.Xml.Xsl.XmlQueryType,System.Xml.Xsl.XmlQueryType):bool:this
           3 ( 5.17% of base) : 138110.dasm - System.Xml.Xsl.XPathConvert:IsInteger(double,byref):bool
           3 (11.54% of base) : 138105.dasm - System.Xml.Xsl.XPathConvert:IsSpecial(double):bool
           2 ( 0.43% of base) : 156738.dasm - Internal.TypeSystem.LayoutInt:AlignUp(Internal.TypeSystem.LayoutInt,Internal.TypeSystem.LayoutInt,Internal.TypeSystem.TargetDetails):Internal.TypeSystem.LayoutInt
           2 ( 1.10% of base) : 76046.dasm - Microsoft.CodeAnalysis.BitVector:set_Item(int,bool):this
           2 ( 0.26% of base) : 27741.dasm - Microsoft.CodeAnalysis.CSharp.DataFlowPass:SetSlotUnassigned(int,byref):this
           2 ( 0.15% of base) : 101984.dasm - Microsoft.Diagnostics.Tracing.Ctf.CtfReader:ReadTypeIntoBuffer(Microsoft.Diagnostics.Tracing.Ctf.CtfStruct,Microsoft.Diagnostics.Tracing.Ctf.CtfMetadataType):this
           1 ( 0.13% of base) : 215047.dasm - <GetContentToSign>d__29:MoveNext():bool:this
           1 ( 0.10% of base) : 150850.dasm - ILCompiler.DependencyAnalysis.ReadyToRun.CopiedFieldRvaNode:GetRvaData(int):System.Byte[]:this
           1 ( 0.14% of base) : 150441.dasm - ILCompiler.PEWriter.R2RPEBuilder:UpdateSectionRVAs(System.IO.Stream):this
           1 ( 0.75% of base) : 156537.dasm - Internal.TypeSystem.AlignmentHelper:AlignUp(int,int):int
           1 ( 0.54% of base) : 75723.dasm - Microsoft.Cci.PeWriter:CalculateOffsetToMappedFieldDataStream(Microsoft.Cci.MetadataSizes):int:this

Top method improvements (bytes):
         -18 (-1.09% of base) : 237769.dasm - Xunit.Sdk.Sha1Digest:ProcessBlock():this
         -17 (-2.11% of base) : 75717.dasm - Microsoft.Cci.PeWriter:CreateSectionHeaders(Microsoft.Cci.MetadataSizes,int):System.Collections.Generic.List`1[[Microsoft.Cci.SectionHeader, Microsoft.CodeAnalysis, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]:this
         -16 (-0.65% of base) : 42977.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SourcePropertySymbol:ForceComplete(Microsoft.CodeAnalysis.SourceLocation,System.Threading.CancellationToken):this
         -16 (-4.91% of base) : 110343.dasm - System.Data.RBTree`1[Byte][System.Byte]:GetIndexOfPageWithFreeSlot(bool):int:this
         -13 (-2.40% of base) : 215017.dasm - System.Reflection.PortableExecutable.PEBuilder:SerializeSections():System.Collections.Immutable.ImmutableArray`1[SerializedSection]:this
         -12 (-3.59% of base) : 110283.dasm - System.Data.RBTree`1[__Canon][System.__Canon]:GetIndexOfPageWithFreeSlot(bool):int:this
         -12 (-2.26% of base) : 229577.dasm - System.Text.RegularExpressions.Symbolic.BDDAlgebra:CreateSetFromRangeImpl(int,int,int):System.Text.RegularExpressions.Symbolic.BDD:this
         -11 (-1.60% of base) : 42162.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.ModifierUtils:CheckModifiers(int,int,Microsoft.CodeAnalysis.Location,Microsoft.CodeAnalysis.DiagnosticBag,byref):int
          -8 (-2.33% of base) : 151566.dasm - Internal.JitInterface.CorInfoImpl:getClassGClayout(long,long):int:this
          -8 (-1.74% of base) : 28026.dasm - Microsoft.CodeAnalysis.CSharp.DiagnosticsPass:CheckForBitwiseOrSignExtend(Microsoft.CodeAnalysis.CSharp.BoundExpression,int,Microsoft.CodeAnalysis.CSharp.BoundExpression,Microsoft.CodeAnalysis.CSharp.BoundExpression):this
          -8 (-0.22% of base) : 215020.dasm - System.Reflection.PortableExecutable.PEBuilder:WritePEHeader(System.Reflection.Metadata.BlobBuilder,System.Reflection.PortableExecutable.PEDirectoriesBuilder,System.Collections.Immutable.ImmutableArray`1[SerializedSection]):this
          -6 (-0.38% of base) : 191077.dasm - System.DirectoryServices.AccountManagement.SDSUtils:AccountControlToDirectoryEntry(System.DirectoryServices.AccountManagement.Principal,System.String,System.DirectoryServices.DirectoryEntry,System.String,bool,bool)
          -6 (-3.17% of base) : 147131.dasm - System.Text.Json.BitStack:PushToArray(bool):this
          -6 (-0.12% of base) : 140182.dasm - System.Xml.Xsl.Runtime.XmlCollation:Create(System.String,bool):System.Xml.Xsl.Runtime.XmlCollation
          -5 (-0.12% of base) : 53315.dasm - Microsoft.CodeAnalysis.VisualBasic.Symbols.SourceNamedTypeSymbol:CheckDeclarationModifiers(Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxNode,Microsoft.CodeAnalysis.VisualBasic.Binder,Microsoft.CodeAnalysis.DiagnosticBag,int):int:this
          -5 (-0.49% of base) : 126011.dasm - System.Runtime.Serialization.DataContract:ComputeHash(System.Byte[]):System.Byte[]
          -4 (-0.44% of base) : 85636.dasm - Microsoft.Diagnostics.Tracing.Parsers.DynamicTraceEventData:PayloadString(int,System.IFormatProvider):System.String:this
          -4 (-8.16% of base) : 81283.dasm - Roslyn.Utilities.ThreadSafeFlagOperations:Clear(byref,int):bool
          -4 (-0.22% of base) : 179409.dasm - System.ComponentModel.EnumConverter:ConvertTo(System.ComponentModel.ITypeDescriptorContext,System.Globalization.CultureInfo,System.Object,System.Type):System.Object:this
          -4 (-12.90% of base) : 179644.dasm - System.ComponentModel.InterlockedBitVector32:DangerousSet(int,bool):this

Top method regressions (percentages):
           3 (30.00% of base) : 43384.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SymbolCompletionState:get_IncompleteParts():int:this
           4 (23.53% of base) : 43388.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SymbolCompletionState:get_NextIncompletePart():int:this
           6 (20.69% of base) : 138025.dasm - System.Xml.Xsl.XmlQueryType:get_MaybeEmpty():bool:this
           6 (20.69% of base) : 138026.dasm - System.Xml.Xsl.XmlQueryType:get_MaybeMany():bool:this
           3 (11.54% of base) : 138105.dasm - System.Xml.Xsl.XPathConvert:IsSpecial(double):bool
           1 (10.00% of base) : 77847.dasm - Microsoft.CodeAnalysis.SymbolDisplayFormat:RemoveKindOptions(int):Microsoft.CodeAnalysis.SymbolDisplayFormat:this
           1 (10.00% of base) : 77844.dasm - Microsoft.CodeAnalysis.SymbolDisplayFormat:RemoveMemberOptions(int):Microsoft.CodeAnalysis.SymbolDisplayFormat:this
           1 (10.00% of base) : 77816.dasm - Microsoft.CodeAnalysis.SymbolDisplayFormat:RemoveParameterOptions(int):Microsoft.CodeAnalysis.SymbolDisplayFormat:this
           1 ( 9.09% of base) : 83919.dasm - Microsoft.Diagnostics.Tracing.BPerfEventSource:AlignUp(int,int):int
           1 ( 9.09% of base) : 101885.dasm - Microsoft.Diagnostics.Tracing.Ctf.IntHelpers:AlignUp(int,int):int
           1 ( 6.67% of base) : 80848.dasm - Roslyn.Utilities.BitArithmeticUtilities:Align(int,int):int
           1 ( 6.67% of base) : 80847.dasm - Roslyn.Utilities.BitArithmeticUtilities:Align(int,int):int
           1 ( 6.67% of base) : 217940.dasm - System.Reflection.Internal.BitArithmetic:Align(int,int):int
           1 ( 6.67% of base) : 217939.dasm - System.Reflection.Internal.BitArithmetic:Align(int,int):int
           1 ( 5.26% of base) : 183253.dasm - System.Configuration.SimpleBitVector32:set_Item(int,bool):this
           3 ( 5.17% of base) : 138110.dasm - System.Xml.Xsl.XPathConvert:IsInteger(double,byref):bool
           1 ( 4.00% of base) : 220174.dasm - System.Security.AccessControl.CommonSecurityDescriptor:UpdateControlFlags(int,int):this
           4 ( 3.20% of base) : 228858.dasm - System.Text.RegularExpressions.RegexParser:ScanOptions():this
           3 ( 1.70% of base) : 138152.dasm - FloatingDecimal:InitFromDouble(double):this
           3 ( 1.21% of base) : 138087.dasm - SequenceType:Create(System.Xml.Xsl.XmlQueryType,System.Xml.Xsl.XmlQueryCardinality):System.Xml.Xsl.XmlQueryType

Top method improvements (percentages):
          -4 (-36.36% of base) : 229611.dasm - System.Text.RegularExpressions.Symbolic.BV64Algebra:Not(long):long:this
          -3 (-20.00% of base) : 237766.dasm - Xunit.Sdk.Sha1Digest:F(int,int,int):int
          -4 (-12.90% of base) : 179644.dasm - System.ComponentModel.InterlockedBitVector32:DangerousSet(int,bool):this
          -1 (-11.11% of base) : 101887.dasm - Microsoft.Diagnostics.Tracing.Ctf.IntHelpers:AlignDown(int,int):int
          -4 (-8.16% of base) : 81283.dasm - Roslyn.Utilities.ThreadSafeFlagOperations:Clear(byref,int):bool
          -4 (-8.16% of base) : 183018.dasm - System.Configuration.SafeBitVector32:set_Item(int,bool):this
          -4 (-8.16% of base) : 218579.dasm - System.Runtime.Caching.SafeBitVector32:set_Item(int,bool):this
          -1 (-7.69% of base) : 138009.dasm - System.Xml.Xsl.XmlQueryCardinality:op_GreaterThanOrEqual(System.Xml.Xsl.XmlQueryCardinality,System.Xml.Xsl.XmlQueryCardinality):bool
          -1 (-7.69% of base) : 138008.dasm - System.Xml.Xsl.XmlQueryCardinality:op_LessThanOrEqual(System.Xml.Xsl.XmlQueryCardinality,System.Xml.Xsl.XmlQueryCardinality):bool
          -4 (-6.06% of base) : 218580.dasm - System.Runtime.Caching.SafeBitVector32:ChangeValue(int,bool):bool:this
          -4 (-5.33% of base) : 144554.dasm - System.Speech.Recognition.RecognizerBase:RemoveEventInterest(long):this
         -16 (-4.91% of base) : 110343.dasm - System.Data.RBTree`1[Byte][System.Byte]:GetIndexOfPageWithFreeSlot(bool):int:this
          -1 (-4.35% of base) : 209982.dasm - System.Net.Sockets.SocketInformation:SetOption(int,bool):this
         -12 (-3.59% of base) : 110283.dasm - System.Data.RBTree`1[__Canon][System.__Canon]:GetIndexOfPageWithFreeSlot(bool):int:this
          -3 (-3.49% of base) : 110280.dasm - System.Data.RBTree`1[__Canon][System.__Canon]:MarkPageFree(TreePage[__Canon]):this
          -3 (-3.49% of base) : 110340.dasm - System.Data.RBTree`1[Byte][System.Byte]:MarkPageFree(TreePage[Byte]):this
          -2 (-3.45% of base) : 175115.dasm - System.Collections.Specialized.BitVector32:set_Item(Section,int):this
          -6 (-3.17% of base) : 147131.dasm - System.Text.Json.BitStack:PushToArray(bool):this
          -1 (-2.78% of base) : 160489.dasm - CacheEntryState:SetFlag(ubyte,bool):this
         -13 (-2.40% of base) : 215017.dasm - System.Reflection.PortableExecutable.PEBuilder:SerializeSections():System.Collections.Immutable.ImmutableArray`1[SerializedSection]:this

89 total methods with Code Size differences (50 improved, 39 regressed), 19 unchanged.


Example:

; Assembly listing for method Microsoft.CodeAnalysis.CSharp.Symbols.SymbolCompletionState:get_NextIncompletePart():int:this
; Emitting BLENDED_CODE for X64 CPU with AVX - Windows
; optimized code
; rsp based frame
; partially interruptible
; No matching PGO data
; 0 inlinees with PGO data; 1 single block inlinees; 0 inlinees without PGO data
; Final local variable assignments
;
;  V00 this         [V00,T01] (  3,  3   )   byref  ->  rcx         this single-def
;# V01 OutArgs      [V01    ] (  1,  1   )  lclBlk ( 0) [rsp+00H]   "OutgoingArgSpace"
;  V02 tmp1         [V02,T00] (  3,  6   )     int  ->  rax         "dup spill"
;
; Lcl frame size = 0

G_M56083_IG01:        ; gcrefRegs=00000000 {}, byrefRegs=00000000 {}, byref, nogc <-- Prolog IG
						;; bbWeight=1    PerfScore 0.00
G_M56083_IG02:        ; gcrefRegs=00000000 {}, byrefRegs=00000002 {rcx}, byref
       ; byrRegs +[rcx]
       mov      eax, dword ptr [rcx]
       not      eax
       and      eax, 0x1FFFF
       lea      edx, [rax-1]
-      not      edx
-      and      eax, edx
+      andn     eax, edx, eax
                                                ;; bbWeight=1    PerfScore 3.50
 G_M56083_IG03:        ; , epilog, nogc, extend
        ret
                                                ;; bbWeight=1    PerfScore 1.00

-; Total bytes of code 17, prolog size 0, PerfScore 6.20, instruction count 7, allocated bytes for code 17 (MethodHash=781a24ec) for method Microsoft.CodeAnalysis.CSharp.Symbols.SymbolCompletionState:get_NextIncompletePart():int:this
+; Total bytes of code 18, prolog size 0, PerfScore 6.30, instruction count 6, allocated bytes for code 18 (MethodHash=781a24ec) for method Microsoft.CodeAnalysis.CSharp.Symbols.SymbolCompletionState:get_NextIncompletePart():int:this
; ============================================================

Unwind Info:
  >> Start offset   : 0x000000 (not in unwind data)
  >>   End offset   : 0xd1ffab1e (not in unwind data)
  Version           : 1
  Flags             : 0x00
  SizeOfProlog      : 0x00
  CountOfUnwindCodes: 0
  FrameRegister     : none (0)
  FrameOffset       : N/A (no FrameRegister) (Value=0)
  UnwindCodes       :

/cc @dotnet/jit-contrib

@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Jan 26, 2022
@dotnet-issue-labeler dotnet-issue-labeler bot added area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI and removed community-contribution Indicates that the PR has been added by a community member labels Jan 26, 2022
@ghost
Copy link

ghost commented Jan 26, 2022

Tagging subscribers to this area: @JulieLeeMSFT
See info in area-owners.md if you want to be subscribed.

Issue Details

This adds a lowering for the pattern AND(x, NOT(y)) and AND(NOT(x),y)) using the existing arm specific logic as a base.

The arm specific version is moved into arm specific lowering where it functions unchanged, it generates a GT_AND_NOT node which is later emitted as a BitClear instruction.

The xarch specific version has been added. It generates a new HWIntrinsic node for the andn instruction taking advantage of the support for the instruction already in place in the emitter. The instruction format needed to be added to the whitelist of formats that are recognised as setting the ZF flag to allow the best optimization.

Diffs are improvements. In all cases where the node is used the instruction count is reduced. In cases where the size has increased it is because the andn instruction plus 3 args encoding consumes one more byte than the combination of simpler and followed by not and their args.

aspnet.run.windows.x64.checked.mch:


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 21586326 (overridden on cmd)
Total bytes of diff: 21586279 (overridden on cmd)
Total bytes of delta: -47 (-0.00 % of base)
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file regressions (bytes):
           1 : 19658.dasm (0.04% of base)
           1 : 44444.dasm (0.04% of base)
           1 : 18515.dasm (0.04% of base)

Top file improvements (bytes):
          -4 : 9096.dasm (-0.58% of base)
          -2 : 53045.dasm (-0.55% of base)
          -1 : 19657.dasm (-0.04% of base)
          -1 : 29342.dasm (-3.45% of base)
          -1 : 57535.dasm (-3.45% of base)
          -1 : 61181.dasm (-0.06% of base)
          -1 : 18514.dasm (-0.04% of base)
          -1 : 41526.dasm (-0.04% of base)
          -1 : 64284.dasm (-0.04% of base)
          -1 : 18559.dasm (-3.45% of base)
          -1 : 64293.dasm (-3.45% of base)
          -1 : 12850.dasm (-3.45% of base)
          -1 : 29363.dasm (-0.04% of base)
          -1 : 64281.dasm (-0.06% of base)
          -1 : 10701.dasm (-1.14% of base)
          -1 : 44434.dasm (-0.04% of base)
          -1 : 44381.dasm (-3.45% of base)
          -1 : 57539.dasm (-0.04% of base)
          -1 : 18557.dasm (-1.79% of base)
          -1 : 61179.dasm (-0.04% of base)

49 total files with Code Size differences (46 improved, 3 regressed), 3 unchanged.

Top method regressions (bytes):
           1 ( 0.04% of base) : 19658.dasm - HttpParser`1:ParseHeaders(Http1ParsingHandler,byref):bool:this
           1 ( 0.04% of base) : 44444.dasm - HttpParser`1:ParseHeaders(Http1ParsingHandler,byref):bool:this
           1 ( 0.04% of base) : 18515.dasm - HttpParser`1:ParseHeaders(Http1ParsingHandler,byref):bool:this

Top method improvements (bytes):
          -4 (-0.58% of base) : 9096.dasm - Sha1ForNonSecretPurposes:Drain():this
          -2 (-0.55% of base) : 53045.dasm - ChainPal:GetChainStatusInformation(int):ref
          -1 (-0.04% of base) : 19657.dasm - Http1Connection:TakeMessageHeaders(byref,bool):bool:this
          -1 (-0.04% of base) : 18514.dasm - Http1Connection:TakeMessageHeaders(byref,bool):bool:this
          -1 (-0.04% of base) : 41526.dasm - Http1Connection:TakeMessageHeaders(byref,bool):bool:this
          -1 (-0.04% of base) : 64284.dasm - Http1Connection:TakeMessageHeaders(byref,bool):bool:this
          -1 (-0.04% of base) : 29363.dasm - Http1Connection:TakeMessageHeaders(byref,bool):bool:this
          -1 (-0.04% of base) : 44434.dasm - Http1Connection:TakeMessageHeaders(byref,bool):bool:this
          -1 (-0.04% of base) : 57539.dasm - Http1Connection:TakeMessageHeaders(byref,bool):bool:this
          -1 (-0.04% of base) : 61179.dasm - Http1Connection:TakeMessageHeaders(byref,bool):bool:this
          -1 (-0.04% of base) : 63077.dasm - Http1Connection:TakeMessageHeaders(byref,bool):bool:this
          -1 (-0.04% of base) : 23857.dasm - Http1Connection:TakeMessageHeaders(byref,bool):bool:this
          -1 (-0.04% of base) : 59338.dasm - Http1Connection:TakeMessageHeaders(byref,bool):bool:this
          -1 (-0.04% of base) : 50012.dasm - Http1Connection:TakeMessageHeaders(byref,bool):bool:this
          -1 (-1.79% of base) : 18557.dasm - Http1ParsingHandler:OnHeadersComplete(bool):this
          -1 (-1.79% of base) : 19666.dasm - Http1ParsingHandler:OnHeadersComplete(bool):this
          -1 (-1.79% of base) : 41529.dasm - Http1ParsingHandler:OnHeadersComplete(bool):this
          -1 (-1.79% of base) : 23866.dasm - Http1ParsingHandler:OnHeadersComplete(bool):this
          -1 (-1.79% of base) : 64291.dasm - Http1ParsingHandler:OnHeadersComplete(bool):this
          -1 (-1.79% of base) : 57543.dasm - Http1ParsingHandler:OnHeadersComplete(bool):this

Top method regressions (percentages):
           1 ( 0.04% of base) : 19658.dasm - HttpParser`1:ParseHeaders(Http1ParsingHandler,byref):bool:this
           1 ( 0.04% of base) : 18515.dasm - HttpParser`1:ParseHeaders(Http1ParsingHandler,byref):bool:this
           1 ( 0.04% of base) : 44444.dasm - HttpParser`1:ParseHeaders(Http1ParsingHandler,byref):bool:this

Top method improvements (percentages):
          -1 (-3.45% of base) : 29342.dasm - HttpRequestHeaders:OnHeadersComplete():this
          -1 (-3.45% of base) : 57535.dasm - HttpRequestHeaders:OnHeadersComplete():this
          -1 (-3.45% of base) : 18559.dasm - HttpRequestHeaders:OnHeadersComplete():this
          -1 (-3.45% of base) : 64293.dasm - HttpRequestHeaders:OnHeadersComplete():this
          -1 (-3.45% of base) : 12850.dasm - HttpRequestHeaders:OnHeadersComplete():this
          -1 (-3.45% of base) : 44381.dasm - HttpRequestHeaders:OnHeadersComplete():this
          -1 (-3.45% of base) : 19667.dasm - HttpRequestHeaders:OnHeadersComplete():this
          -1 (-3.45% of base) : 41531.dasm - HttpRequestHeaders:OnHeadersComplete():this
          -1 (-3.45% of base) : 59350.dasm - HttpRequestHeaders:OnHeadersComplete():this
          -1 (-3.45% of base) : 23872.dasm - HttpRequestHeaders:OnHeadersComplete():this
          -1 (-3.45% of base) : 50002.dasm - HttpRequestHeaders:OnHeadersComplete():this
          -1 (-3.45% of base) : 63082.dasm - HttpRequestHeaders:OnHeadersComplete():this
          -1 (-3.45% of base) : 61212.dasm - HttpRequestHeaders:OnHeadersComplete():this
          -1 (-1.79% of base) : 18557.dasm - Http1ParsingHandler:OnHeadersComplete(bool):this
          -1 (-1.79% of base) : 19666.dasm - Http1ParsingHandler:OnHeadersComplete(bool):this
          -1 (-1.79% of base) : 41529.dasm - Http1ParsingHandler:OnHeadersComplete(bool):this
          -1 (-1.79% of base) : 23866.dasm - Http1ParsingHandler:OnHeadersComplete(bool):this
          -1 (-1.79% of base) : 64291.dasm - Http1ParsingHandler:OnHeadersComplete(bool):this
          -1 (-1.79% of base) : 57543.dasm - Http1ParsingHandler:OnHeadersComplete(bool):this
          -1 (-1.79% of base) : 61211.dasm - Http1ParsingHandler:OnHeadersComplete(bool):this

49 total methods with Code Size differences (46 improved, 3 regressed), 3 unchanged.


benchmarks.run.windows.x64.checked.mch:


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 13177305 (overridden on cmd)
Total bytes of diff: 13177208 (overridden on cmd)
Total bytes of delta: -97 (-0.00 % of base)
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file regressions (bytes):
           1 : 35514.dasm (0.17% of base)
           1 : 35530.dasm (0.81% of base)

Top file improvements (bytes):
         -16 : 33641.dasm (-3.25% of base)
         -14 : 33973.dasm (-1.14% of base)
         -13 : 35515.dasm (-2.40% of base)
         -12 : 7250.dasm (-2.26% of base)
         -11 : 33688.dasm (-0.66% of base)
          -8 : 34512.dasm (-1.78% of base)
          -8 : 35570.dasm (-0.22% of base)
          -6 : 9736.dasm (-3.17% of base)
          -5 : 6916.dasm (-1.12% of base)
          -3 : 795.dasm (-0.46% of base)
          -2 : 6587.dasm (-0.57% of base)
          -1 : 4449.dasm (-0.88% of base)

14 total files with Code Size differences (12 improved, 2 regressed), 6 unchanged.

Top method regressions (bytes):
           1 ( 0.81% of base) : 35530.dasm - System.Reflection.PortableExecutable.ManagedTextSection:CalculateOffsetToMappedFieldDataStream():int:this
           1 ( 0.17% of base) : 35514.dasm - System.Reflection.PortableExecutable.PEBuilder:Serialize(System.Reflection.Metadata.BlobBuilder):System.Reflection.Metadata.BlobContentId:this

Top method improvements (bytes):
         -16 (-3.25% of base) : 33641.dasm - Microsoft.CodeAnalysis.CSharp.Imports:Complete(System.Threading.CancellationToken):this
         -14 (-1.14% of base) : 33973.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamespaceSymbol:ForceComplete(Microsoft.CodeAnalysis.SourceLocation,System.Threading.CancellationToken):this
         -13 (-2.40% of base) : 35515.dasm - System.Reflection.PortableExecutable.PEBuilder:SerializeSections():System.Collections.Immutable.ImmutableArray`1[SerializedSection]:this
         -12 (-2.26% of base) : 7250.dasm - System.Text.RegularExpressions.Symbolic.BDDAlgebra:CreateSetFromRangeImpl(int,int,int):System.Text.RegularExpressions.Symbolic.BDD:this
         -11 (-0.66% of base) : 33688.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.ModifierUtils:CheckModifiers(int,int,Microsoft.CodeAnalysis.Location,Microsoft.CodeAnalysis.DiagnosticBag,System.Nullable`1[SyntaxTokenList],byref):int
          -8 (-1.78% of base) : 34512.dasm - Microsoft.CodeAnalysis.CSharp.DiagnosticsPass:CheckForBitwiseOrSignExtend(Microsoft.CodeAnalysis.CSharp.BoundExpression,int,Microsoft.CodeAnalysis.CSharp.BoundExpression,Microsoft.CodeAnalysis.CSharp.BoundExpression):this
          -8 (-0.22% of base) : 35570.dasm - System.Reflection.PortableExecutable.PEBuilder:WritePEHeader(System.Reflection.Metadata.BlobBuilder,System.Reflection.PortableExecutable.PEDirectoriesBuilder,System.Collections.Immutable.ImmutableArray`1[SerializedSection]):this
          -6 (-3.17% of base) : 9736.dasm - System.Text.Json.BitStack:PushToArray(bool):this
          -5 (-1.12% of base) : 6916.dasm - System.Number:AssembleFloatingPointBits(byref,long,int,bool):long
          -3 (-0.46% of base) : 795.dasm - System.Sha1ForNonSecretPurposes:Drain():this
          -2 (-0.57% of base) : 6587.dasm - Internal.Cryptography.Pal.ChainPal:GetChainStatusInformation(int):System.Security.Cryptography.X509Certificates.X509ChainStatus[]
          -1 (-0.88% of base) : 4449.dasm - System.Threading.ManualResetEventSlim:UpdateStateAtomically(int,int):this

Top method regressions (percentages):
           1 ( 0.81% of base) : 35530.dasm - System.Reflection.PortableExecutable.ManagedTextSection:CalculateOffsetToMappedFieldDataStream():int:this
           1 ( 0.17% of base) : 35514.dasm - System.Reflection.PortableExecutable.PEBuilder:Serialize(System.Reflection.Metadata.BlobBuilder):System.Reflection.Metadata.BlobContentId:this

Top method improvements (percentages):
         -16 (-3.25% of base) : 33641.dasm - Microsoft.CodeAnalysis.CSharp.Imports:Complete(System.Threading.CancellationToken):this
          -6 (-3.17% of base) : 9736.dasm - System.Text.Json.BitStack:PushToArray(bool):this
         -13 (-2.40% of base) : 35515.dasm - System.Reflection.PortableExecutable.PEBuilder:SerializeSections():System.Collections.Immutable.ImmutableArray`1[SerializedSection]:this
         -12 (-2.26% of base) : 7250.dasm - System.Text.RegularExpressions.Symbolic.BDDAlgebra:CreateSetFromRangeImpl(int,int,int):System.Text.RegularExpressions.Symbolic.BDD:this
          -8 (-1.78% of base) : 34512.dasm - Microsoft.CodeAnalysis.CSharp.DiagnosticsPass:CheckForBitwiseOrSignExtend(Microsoft.CodeAnalysis.CSharp.BoundExpression,int,Microsoft.CodeAnalysis.CSharp.BoundExpression,Microsoft.CodeAnalysis.CSharp.BoundExpression):this
         -14 (-1.14% of base) : 33973.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamespaceSymbol:ForceComplete(Microsoft.CodeAnalysis.SourceLocation,System.Threading.CancellationToken):this
          -5 (-1.12% of base) : 6916.dasm - System.Number:AssembleFloatingPointBits(byref,long,int,bool):long
          -1 (-0.88% of base) : 4449.dasm - System.Threading.ManualResetEventSlim:UpdateStateAtomically(int,int):this
         -11 (-0.66% of base) : 33688.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.ModifierUtils:CheckModifiers(int,int,Microsoft.CodeAnalysis.Location,Microsoft.CodeAnalysis.DiagnosticBag,System.Nullable`1[SyntaxTokenList],byref):int
          -2 (-0.57% of base) : 6587.dasm - Internal.Cryptography.Pal.ChainPal:GetChainStatusInformation(int):System.Security.Cryptography.X509Certificates.X509ChainStatus[]
          -3 (-0.46% of base) : 795.dasm - System.Sha1ForNonSecretPurposes:Drain():this
          -8 (-0.22% of base) : 35570.dasm - System.Reflection.PortableExecutable.PEBuilder:WritePEHeader(System.Reflection.Metadata.BlobBuilder,System.Reflection.PortableExecutable.PEDirectoriesBuilder,System.Collections.Immutable.ImmutableArray`1[SerializedSection]):this

14 total methods with Code Size differences (12 improved, 2 regressed), 6 unchanged.


coreclr_tests.pmi.windows.x64.checked.mch:


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 127515319 (overridden on cmd)
Total bytes of diff: 127515308 (overridden on cmd)
Total bytes of delta: -11 (-0.00 % of base)
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file regressions (bytes):
           6 : 216048.dasm (0.04% of base)
           1 : 20009.dasm (5.00% of base)
           1 : 115827.dasm (5.00% of base)
           1 : 133456.dasm (5.00% of base)
           1 : 149367.dasm (5.00% of base)
           1 : 118006.dasm (5.00% of base)
           1 : 125315.dasm (5.00% of base)
           1 : 141784.dasm (5.00% of base)
           1 : 183258.dasm (5.00% of base)
           1 : 191508.dasm (5.00% of base)
           1 : 128618.dasm (5.00% of base)
           1 : 185786.dasm (5.00% of base)
           1 : 113879.dasm (5.00% of base)
           1 : 131568.dasm (5.00% of base)
           1 : 146747.dasm (5.00% of base)
           1 : 187439.dasm (5.00% of base)
           1 : 145037.dasm (5.00% of base)
           1 : 193326.dasm (5.00% of base)
           1 : 230347.dasm (0.43% of base)
           1 : 116641.dasm (5.00% of base)

Top file improvements (bytes):
          -4 : 226748.dasm (-0.45% of base)
          -4 : 12134.dasm (-40.00% of base)
          -4 : 243015.dasm (-4.65% of base)
          -4 : 12141.dasm (-40.00% of base)
          -1 : 113880.dasm (-4.00% of base)
          -1 : 133457.dasm (-4.00% of base)
          -1 : 190635.dasm (-4.00% of base)
          -1 : 115828.dasm (-4.00% of base)
          -1 : 125316.dasm (-4.00% of base)
          -1 : 146748.dasm (-4.00% of base)
          -1 : 187440.dasm (-4.00% of base)
          -1 : 18933.dasm (-4.00% of base)
          -1 : 118007.dasm (-4.00% of base)
          -1 : 145038.dasm (-4.00% of base)
          -1 : 193327.dasm (-4.00% of base)
          -1 : 195010.dasm (-4.00% of base)
          -1 : 120375.dasm (-4.00% of base)
          -1 : 128619.dasm (-4.00% of base)
          -1 : 184142.dasm (-4.00% of base)
          -1 : 131569.dasm (-4.00% of base)

74 total files with Code Size differences (39 improved, 35 regressed), 0 unchanged.

Top method regressions (bytes):
           6 ( 0.04% of base) : 216048.dasm - Internal.IL.ILImporter:ImportBasicBlock(BasicBlock):this
           1 ( 2.17% of base) : 216083.dasm - Internal.IL.ILImporter:EndImportingInstruction():this
           1 ( 5.00% of base) : 20009.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 115827.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 133456.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 149367.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 118006.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 125315.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 141784.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 183258.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 191508.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 128618.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 185786.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 113879.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 131568.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 146747.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 187439.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 145037.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 193326.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 116641.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float

Top method improvements (bytes):
          -4 (-4.65% of base) : 243015.dasm - FPBehaviorApp.Managed:Truncate(double):double
          -4 (-40.00% of base) : 12134.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(long,long):long
          -4 (-40.00% of base) : 12141.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(long,long):long
          -4 (-0.45% of base) : 226748.dasm - JIT.HardwareIntrinsics.X86.ScalarBinaryOpTest__AndNotUInt64:ValidateResult(long,long,long,System.String):this
          -1 (-4.00% of base) : 113880.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 133457.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 190635.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 115828.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 125316.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 146748.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 187440.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 18933.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 118007.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 145038.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 193327.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 195010.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 120375.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 128619.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 184142.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 131569.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double

Top method regressions (percentages):
           1 ( 5.00% of base) : 20009.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 115827.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 133456.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 149367.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 118006.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 125315.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 141784.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 183258.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 191508.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 128618.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 185786.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 113879.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 131568.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 146747.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 187439.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 145037.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 193326.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 116641.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 120374.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float
           1 ( 5.00% of base) : 122444.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(float,float):float

Top method improvements (percentages):
          -4 (-40.00% of base) : 12134.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(long,long):long
          -4 (-40.00% of base) : 12141.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(long,long):long
          -1 (-14.29% of base) : 12184.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(int,int):int
          -1 (-14.29% of base) : 12191.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(int,int):int
          -4 (-4.65% of base) : 243015.dasm - FPBehaviorApp.Managed:Truncate(double):double
          -1 (-4.00% of base) : 113880.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 133457.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 190635.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 115828.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 125316.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 146748.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 187440.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 18933.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 118007.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 145038.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 193327.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 195010.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 120375.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 128619.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double
          -1 (-4.00% of base) : 184142.dasm - JIT.HardwareIntrinsics.Arm.Helpers:BitwiseClear(double,double):double

74 total methods with Code Size differences (39 improved, 35 regressed), 0 unchanged.


libraries.pmi.windows.x64.checked.mch:


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 47108531 (overridden on cmd)
Total bytes of diff: 47108347 (overridden on cmd)
Total bytes of delta: -184 (-0.00 % of base)
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file regressions (bytes):
           1 : 217940.dasm (6.67% of base)
           1 : 215047.dasm (0.13% of base)
           1 : 140412.dasm (0.40% of base)
           1 : 214999.dasm (0.81% of base)
           1 : 81411.dasm (0.41% of base)
           1 : 183253.dasm (5.26% of base)
           1 : 219907.dasm (0.41% of base)
           1 : 217939.dasm (6.67% of base)
           1 : 75723.dasm (0.54% of base)
           1 : 75716.dasm (0.05% of base)
           1 : 43388.dasm (5.88% of base)
           1 : 80848.dasm (6.67% of base)
           1 : 215016.dasm (0.17% of base)
           1 : 80847.dasm (6.67% of base)

Top file improvements (bytes):
         -18 : 237769.dasm (-1.09% of base)
         -17 : 75717.dasm (-2.11% of base)
         -16 : 42977.dasm (-0.65% of base)
         -16 : 23345.dasm (-3.12% of base)
         -13 : 215017.dasm (-2.40% of base)
         -12 : 229577.dasm (-2.26% of base)
         -11 : 42162.dasm (-1.60% of base)
          -8 : 215020.dasm (-0.22% of base)
          -8 : 28026.dasm (-1.74% of base)
          -6 : 191077.dasm (-0.38% of base)
          -6 : 140182.dasm (-0.12% of base)
          -6 : 147131.dasm (-3.17% of base)
          -5 : 126011.dasm (-0.49% of base)
          -4 : 126180.dasm (-0.51% of base)
          -4 : 218579.dasm (-8.16% of base)
          -4 : 85636.dasm (-0.44% of base)
          -4 : 81283.dasm (-8.16% of base)
          -4 : 183018.dasm (-8.16% of base)
          -4 : 144554.dasm (-5.33% of base)
          -4 : 179409.dasm (-0.22% of base)

51 total files with Code Size differences (37 improved, 14 regressed), 13 unchanged.

Top method regressions (bytes):
           1 ( 0.13% of base) : 215047.dasm - <GetContentToSign>d__29:MoveNext():bool:this
           1 ( 0.54% of base) : 75723.dasm - Microsoft.Cci.PeWriter:CalculateOffsetToMappedFieldDataStream(Microsoft.Cci.MetadataSizes):int:this
           1 ( 0.05% of base) : 75716.dasm - Microsoft.Cci.PeWriter:WritePeToStream(Microsoft.Cci.MetadataWriter,System.Func`1[[System.IO.Stream, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]],System.Func`1[[System.IO.Stream, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]],Microsoft.Cci.PdbWriter):bool:this
           1 ( 5.88% of base) : 43388.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SymbolCompletionState:get_NextIncompletePart():int:this
           1 ( 6.67% of base) : 80848.dasm - Roslyn.Utilities.BitArithmeticUtilities:Align(int,int):int
           1 ( 6.67% of base) : 80847.dasm - Roslyn.Utilities.BitArithmeticUtilities:Align(int,int):int
           1 ( 0.41% of base) : 81411.dasm - Roslyn.Utilities.ObjectReader:ReadCompressedUInt():int:this
           1 ( 5.26% of base) : 183253.dasm - System.Configuration.SimpleBitVector32:set_Item(int,bool):this
           1 ( 6.67% of base) : 217940.dasm - System.Reflection.Internal.BitArithmetic:Align(int,int):int
           1 ( 6.67% of base) : 217939.dasm - System.Reflection.Internal.BitArithmetic:Align(int,int):int
           1 ( 0.81% of base) : 214999.dasm - System.Reflection.PortableExecutable.ManagedTextSection:CalculateOffsetToMappedFieldDataStream():int:this
           1 ( 0.17% of base) : 215016.dasm - System.Reflection.PortableExecutable.PEBuilder:Serialize(System.Reflection.Metadata.BlobBuilder):System.Reflection.Metadata.BlobContentId:this
           1 ( 0.41% of base) : 219907.dasm - System.Security.AccessControl.CommonAcl:RemoveInheritanceBits(ubyte,ubyte,bool,byref,byref):bool
           1 ( 0.40% of base) : 140412.dasm - System.Xml.Xsl.Runtime.XmlQueryRuntime:MatchesXmlType(System.Collections.Generic.IList`1[[System.Xml.XPath.XPathItem, System.Private.Xml, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]],int):bool:this

Top method improvements (bytes):
         -18 (-1.09% of base) : 237769.dasm - Xunit.Sdk.Sha1Digest:ProcessBlock():this
         -17 (-2.11% of base) : 75717.dasm - Microsoft.Cci.PeWriter:CreateSectionHeaders(Microsoft.Cci.MetadataSizes,int):System.Collections.Generic.List`1[[Microsoft.Cci.SectionHeader, Microsoft.CodeAnalysis, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]:this
         -16 (-3.12% of base) : 23345.dasm - Microsoft.CodeAnalysis.CSharp.Imports:Complete(System.Threading.CancellationToken):this
         -16 (-0.65% of base) : 42977.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SourcePropertySymbol:ForceComplete(Microsoft.CodeAnalysis.SourceLocation,System.Threading.CancellationToken):this
         -13 (-2.40% of base) : 215017.dasm - System.Reflection.PortableExecutable.PEBuilder:SerializeSections():System.Collections.Immutable.ImmutableArray`1[SerializedSection]:this
         -12 (-2.26% of base) : 229577.dasm - System.Text.RegularExpressions.Symbolic.BDDAlgebra:CreateSetFromRangeImpl(int,int,int):System.Text.RegularExpressions.Symbolic.BDD:this
         -11 (-1.60% of base) : 42162.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.ModifierUtils:CheckModifiers(int,int,Microsoft.CodeAnalysis.Location,Microsoft.CodeAnalysis.DiagnosticBag,byref):int
          -8 (-1.74% of base) : 28026.dasm - Microsoft.CodeAnalysis.CSharp.DiagnosticsPass:CheckForBitwiseOrSignExtend(Microsoft.CodeAnalysis.CSharp.BoundExpression,int,Microsoft.CodeAnalysis.CSharp.BoundExpression,Microsoft.CodeAnalysis.CSharp.BoundExpression):this
          -8 (-0.22% of base) : 215020.dasm - System.Reflection.PortableExecutable.PEBuilder:WritePEHeader(System.Reflection.Metadata.BlobBuilder,System.Reflection.PortableExecutable.PEDirectoriesBuilder,System.Collections.Immutable.ImmutableArray`1[SerializedSection]):this
          -6 (-0.38% of base) : 191077.dasm - System.DirectoryServices.AccountManagement.SDSUtils:AccountControlToDirectoryEntry(System.DirectoryServices.AccountManagement.Principal,System.String,System.DirectoryServices.DirectoryEntry,System.String,bool,bool)
          -6 (-3.17% of base) : 147131.dasm - System.Text.Json.BitStack:PushToArray(bool):this
          -6 (-0.12% of base) : 140182.dasm - System.Xml.Xsl.Runtime.XmlCollation:Create(System.String,bool):System.Xml.Xsl.Runtime.XmlCollation
          -5 (-0.49% of base) : 126011.dasm - System.Runtime.Serialization.DataContract:ComputeHash(System.Byte[]):System.Byte[]
          -4 (-0.44% of base) : 85636.dasm - Microsoft.Diagnostics.Tracing.Parsers.DynamicTraceEventData:PayloadString(int,System.IFormatProvider):System.String:this
          -4 (-8.16% of base) : 81283.dasm - Roslyn.Utilities.ThreadSafeFlagOperations:Clear(byref,int):bool
          -4 (-0.22% of base) : 179409.dasm - System.ComponentModel.EnumConverter:ConvertTo(System.ComponentModel.ITypeDescriptorContext,System.Globalization.CultureInfo,System.Object,System.Type):System.Object:this
          -4 (-8.16% of base) : 183018.dasm - System.Configuration.SafeBitVector32:set_Item(int,bool):this
          -4 (-6.06% of base) : 218580.dasm - System.Runtime.Caching.SafeBitVector32:ChangeValue(int,bool):bool:this
          -4 (-8.16% of base) : 218579.dasm - System.Runtime.Caching.SafeBitVector32:set_Item(int,bool):this
          -4 (-0.51% of base) : 126180.dasm - System.Runtime.Serialization.EnumDataContract:WriteEnumValue(System.Runtime.Serialization.XmlWriterDelegator,System.Object):this

Top method regressions (percentages):
           1 ( 6.67% of base) : 80848.dasm - Roslyn.Utilities.BitArithmeticUtilities:Align(int,int):int
           1 ( 6.67% of base) : 80847.dasm - Roslyn.Utilities.BitArithmeticUtilities:Align(int,int):int
           1 ( 6.67% of base) : 217940.dasm - System.Reflection.Internal.BitArithmetic:Align(int,int):int
           1 ( 6.67% of base) : 217939.dasm - System.Reflection.Internal.BitArithmetic:Align(int,int):int
           1 ( 5.88% of base) : 43388.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SymbolCompletionState:get_NextIncompletePart():int:this
           1 ( 5.26% of base) : 183253.dasm - System.Configuration.SimpleBitVector32:set_Item(int,bool):this
           1 ( 0.81% of base) : 214999.dasm - System.Reflection.PortableExecutable.ManagedTextSection:CalculateOffsetToMappedFieldDataStream():int:this
           1 ( 0.54% of base) : 75723.dasm - Microsoft.Cci.PeWriter:CalculateOffsetToMappedFieldDataStream(Microsoft.Cci.MetadataSizes):int:this
           1 ( 0.41% of base) : 219907.dasm - System.Security.AccessControl.CommonAcl:RemoveInheritanceBits(ubyte,ubyte,bool,byref,byref):bool
           1 ( 0.41% of base) : 81411.dasm - Roslyn.Utilities.ObjectReader:ReadCompressedUInt():int:this
           1 ( 0.40% of base) : 140412.dasm - System.Xml.Xsl.Runtime.XmlQueryRuntime:MatchesXmlType(System.Collections.Generic.IList`1[[System.Xml.XPath.XPathItem, System.Private.Xml, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]],int):bool:this
           1 ( 0.17% of base) : 215016.dasm - System.Reflection.PortableExecutable.PEBuilder:Serialize(System.Reflection.Metadata.BlobBuilder):System.Reflection.Metadata.BlobContentId:this
           1 ( 0.13% of base) : 215047.dasm - <GetContentToSign>d__29:MoveNext():bool:this
           1 ( 0.05% of base) : 75716.dasm - Microsoft.Cci.PeWriter:WritePeToStream(Microsoft.Cci.MetadataWriter,System.Func`1[[System.IO.Stream, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]],System.Func`1[[System.IO.Stream, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]],Microsoft.Cci.PdbWriter):bool:this

Top method improvements (percentages):
          -3 (-20.00% of base) : 237766.dasm - Xunit.Sdk.Sha1Digest:F(int,int,int):int
          -1 (-11.11% of base) : 101887.dasm - Microsoft.Diagnostics.Tracing.Ctf.IntHelpers:AlignDown(int,int):int
          -4 (-8.16% of base) : 81283.dasm - Roslyn.Utilities.ThreadSafeFlagOperations:Clear(byref,int):bool
          -4 (-8.16% of base) : 183018.dasm - System.Configuration.SafeBitVector32:set_Item(int,bool):this
          -4 (-8.16% of base) : 218579.dasm - System.Runtime.Caching.SafeBitVector32:set_Item(int,bool):this
          -1 (-7.69% of base) : 138009.dasm - System.Xml.Xsl.XmlQueryCardinality:op_GreaterThanOrEqual(System.Xml.Xsl.XmlQueryCardinality,System.Xml.Xsl.XmlQueryCardinality):bool
          -1 (-7.69% of base) : 138008.dasm - System.Xml.Xsl.XmlQueryCardinality:op_LessThanOrEqual(System.Xml.Xsl.XmlQueryCardinality,System.Xml.Xsl.XmlQueryCardinality):bool
          -4 (-6.06% of base) : 218580.dasm - System.Runtime.Caching.SafeBitVector32:ChangeValue(int,bool):bool:this
          -4 (-5.33% of base) : 144554.dasm - System.Speech.Recognition.RecognizerBase:RemoveEventInterest(long):this
          -3 (-3.49% of base) : 110280.dasm - System.Data.RBTree`1[__Canon][System.__Canon]:MarkPageFree(TreePage[__Canon]):this
          -3 (-3.49% of base) : 110340.dasm - System.Data.RBTree`1[Byte][System.Byte]:MarkPageFree(TreePage[Byte]):this
          -6 (-3.17% of base) : 147131.dasm - System.Text.Json.BitStack:PushToArray(bool):this
         -16 (-3.12% of base) : 23345.dasm - Microsoft.CodeAnalysis.CSharp.Imports:Complete(System.Threading.CancellationToken):this
         -13 (-2.40% of base) : 215017.dasm - System.Reflection.PortableExecutable.PEBuilder:SerializeSections():System.Collections.Immutable.ImmutableArray`1[SerializedSection]:this
         -12 (-2.26% of base) : 229577.dasm - System.Text.RegularExpressions.Symbolic.BDDAlgebra:CreateSetFromRangeImpl(int,int,int):System.Text.RegularExpressions.Symbolic.BDD:this
         -17 (-2.11% of base) : 75717.dasm - Microsoft.Cci.PeWriter:CreateSectionHeaders(Microsoft.Cci.MetadataSizes,int):System.Collections.Generic.List`1[[Microsoft.Cci.SectionHeader, Microsoft.CodeAnalysis, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]:this
          -8 (-1.74% of base) : 28026.dasm - Microsoft.CodeAnalysis.CSharp.DiagnosticsPass:CheckForBitwiseOrSignExtend(Microsoft.CodeAnalysis.CSharp.BoundExpression,int,Microsoft.CodeAnalysis.CSharp.BoundExpression,Microsoft.CodeAnalysis.CSharp.BoundExpression):this
         -11 (-1.60% of base) : 42162.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.ModifierUtils:CheckModifiers(int,int,Microsoft.CodeAnalysis.Location,Microsoft.CodeAnalysis.DiagnosticBag,byref):int
         -18 (-1.09% of base) : 237769.dasm - Xunit.Sdk.Sha1Digest:ProcessBlock():this
          -1 (-1.08% of base) : 180606.dasm - System.ComponentModel.Design.MenuCommand:SetStatus(int,bool):this

51 total methods with Code Size differences (37 improved, 14 regressed), 13 unchanged.

Example:

; Assembly listing for method Microsoft.CodeAnalysis.CSharp.Symbols.SymbolCompletionState:get_NextIncompletePart():int:this
; Emitting BLENDED_CODE for X64 CPU with AVX - Windows
; optimized code
; rsp based frame
; partially interruptible
; No matching PGO data
; 0 inlinees with PGO data; 1 single block inlinees; 0 inlinees without PGO data
; Final local variable assignments
;
;  V00 this         [V00,T01] (  3,  3   )   byref  ->  rcx         this single-def
;# V01 OutArgs      [V01    ] (  1,  1   )  lclBlk ( 0) [rsp+00H]   "OutgoingArgSpace"
;  V02 tmp1         [V02,T00] (  3,  6   )     int  ->  rax         "dup spill"
;
; Lcl frame size = 0

G_M56083_IG01:        ; gcrefRegs=00000000 {}, byrefRegs=00000000 {}, byref, nogc <-- Prolog IG
						;; bbWeight=1    PerfScore 0.00
G_M56083_IG02:        ; gcrefRegs=00000000 {}, byrefRegs=00000002 {rcx}, byref
       ; byrRegs +[rcx]
       mov      eax, dword ptr [rcx]
       not      eax
       and      eax, 0x1FFFF
       lea      edx, [rax-1]
-      not      edx
-      and      eax, edx
+      andn     eax, edx, eax
                                                ;; bbWeight=1    PerfScore 3.50
 G_M56083_IG03:        ; , epilog, nogc, extend
        ret
                                                ;; bbWeight=1    PerfScore 1.00

-; Total bytes of code 17, prolog size 0, PerfScore 6.20, instruction count 7, allocated bytes for code 17 (MethodHash=781a24ec) for method Microsoft.CodeAnalysis.CSharp.Symbols.SymbolCompletionState:get_NextIncompletePart():int:this
+; Total bytes of code 18, prolog size 0, PerfScore 6.30, instruction count 6, allocated bytes for code 18 (MethodHash=781a24ec) for method Microsoft.CodeAnalysis.CSharp.Symbols.SymbolCompletionState:get_NextIncompletePart():int:this
; ============================================================

Unwind Info:
  >> Start offset   : 0x000000 (not in unwind data)
  >>   End offset   : 0xd1ffab1e (not in unwind data)
  Version           : 1
  Flags             : 0x00
  SizeOfProlog      : 0x00
  CountOfUnwindCodes: 0
  FrameRegister     : none (0)
  FrameOffset       : N/A (no FrameRegister) (Value=0)
  UnwindCodes       :

/cc @dotnet/jit-contrib

Author: Wraith2
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@kunalspathak
Copy link
Member

The instruction format needed to be added to the whitelist of formats that are recognised as setting the ZF flag to allow the best optimization.

Could you point the place in the manual where it describes which flags are set with andn? I was not able to find anything for Appendix F Instruction Effects on RFLAGS (AMD manual) or Appendix A EFLAGS CROSS-REFERENCE.

@tannergooding
Copy link
Member

tannergooding commented Jan 26, 2022

@kunalspathak, The actual instruction pages call out

AMD

The flags are set according to the result of the and pseudo-operation.

Intel

SF and ZF are updated based on result. OF and CF flags are cleared. AF and PF flags are undefined.

and so are in general agreement, other than PF which is M for and (and so therefore M on AMD) and "undefined" by Intel

@kunalspathak
Copy link
Member

@tannergooding - Thanks for the pointers. This is what I see in AMD manual, so perhaps we need to change from Writes_CF to Reset_CF? That's what we have currently for and:

INST4(and, "and", IUM_RW, 0x000020, 0x002080, 0x000022, 0x000024, Resets_OF | Writes_SF | Writes_ZF | Undefined_AF | Writes_PF | Resets_CF | INS_FLAGS_Has_Sbit | INS_FLAGS_Has_Wbit )

image

@JulieLeeMSFT JulieLeeMSFT added this to the 7.0.0 milestone Jan 27, 2022
@Wraith2
Copy link
Contributor Author

Wraith2 commented Feb 1, 2022

@kunalspathak could you review when you get chance please?

@rickbrew
Copy link
Contributor

rickbrew commented Feb 2, 2022

Definitely pumped for this, good stuff @Wraith2 👍🏼 This sort of thing will help my ARM64 builds where I haven't done much arch-specific fine-tuning (and can't really justify the cost of doing so yet)

Copy link
Member

@kunalspathak kunalspathak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for your contribution.

src/coreclr/jit/lowerxarch.cpp Outdated Show resolved Hide resolved
src/coreclr/jit/lowerxarch.cpp Outdated Show resolved Hide resolved
@kunalspathak kunalspathak merged commit 1227d3b into dotnet:main Feb 2, 2022
@Wraith2 Wraith2 deleted the add-xarch-andn branch February 2, 2022 08:32
@SingleAccretion
Copy link
Contributor

(23% of all of them)
@SingleAccretion - Curious, where did you get that number from?

@kunalspathak it's the number one gets enabling COUNT_AST_OPERS (I think I measure it on CoreLib at the time). I suppose it wouldn't really be correct in this context, as a lot of those nodes will be locations (defs/under ADDRs), for uses it'll probably be more like 10%+.

@ghost ghost locked as resolved and limited conversation to collaborators Mar 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants