[lworld+vector] RFR: 8307715: Integrate VectorMask/Shuffle with value/primitive classes [v7]

Jatin Bhateja jbhateja at openjdk.org
Mon May 29 06:49:49 UTC 2023


On Mon, 29 May 2023 01:50:15 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:

> > Thanks, did not do a test re-run with latest patch as there were several regressions in pervious one, one quick comment, kindly set can_optimize = false before following line,
> > https://github.com/openjdk/valhalla/pull/845/files#diff-e368502932198721c3ee52ace2397c5a9c6281930e83fc53a429573f6adf44fcR2584
> 
> It seems not right setting `can_optimize = false` before line-2584 for me. This will break the inner loop anyway, since it doesn't set `can_optimize = true` in the followed code, does it?

I am seeing an incorrect graph shape here for ABSMaskedByte256VectorTests


 2970  VectorBox  === _ 2967 34 2969  [[ 562 557 ]]  #jdk/incubator/vector/Byte256Vector$Byte256Mask:NotNull:exact *  Oop:jdk/incubator/vector/Byte256Vector$Byte256Mask:NotNull:exact * !orig=[3040],... !jvms: VectorMask::fromArray @ bci:47 (line 212) Byte256VectorTests::ABSMaskedByte256VectorTests @ bci:63 (line 5256)
  561  IfTrue  === 559  [[ 2883 562 ]] #1 !jvms: VectorMask::fromArray @ bci:50 (line 212) Byte256VectorTests::ABSMaskedByte256VectorTests @ bci:63 (line 5256)
 2883  If  === 561 2882  [[ 2884 2885 ]] P=0.000001, C=-1.000000 !orig=[584] !jvms: VectorMask::fromArray @ bci:50 (line 212) Byte256VectorTests::ABSMaskedByte256VectorTests @ bci:63 (line 5256)
 1181  LoadVector  === 2876 2991 1180  [[ 1179 3038 ]]  @jdk/incubator/vector/Byte256Vector$Byte256Mask:exact+16 *, name=mfield, idx=10; mismatched #vectory[32]:{bool} !jvms: Byte256Vector::lanewise @ bci:5 (line 279) Byte256Vector::lanewise @ bci:3 (line 42) Byte256VectorTests::ABSMaskedByte256VectorTests @ bci:107 (line 5261)
   51  ConP  === 0  [[ 52 60 137 146 252 259 332 340 452 434 557 565 801 788 2286 1058 1066 1081 1179 2286 3018 1808 1823 1907 1915 1969 1956 2279 2969 2994 3030 3031 3034 3036 3036 ]]  #NULL
    0  Root  === 0 64 83 150 166 263 280 344 360 438 456 569 597 620 633 646 684 696 708 792 805 1070 1090 1188 1812 1832 1919 1960 1973 2243 2255 2267 2290 2305 2365 2394 2463 2834 2557 2833 2627 2826 2669 2813 2731 2756  |2152 2172 2504  [[ 0 1 3 2487 23 2435 26 2349 2343 32 34 50 51 59 69 78 2205 107 134 145 2155 2154 601 2821 329 1914 1771 1166 411 413 433 451 478 1099 500 502 1036 935 506 858 641 628 534 554 615 ]] 
 2876  IfFalse  === 2875  [[ 1181 1177 3002 ]] #0 !orig=[1175] !jvms: Byte256Vector::lanewise @ bci:5 (line 279) Byte256Vector::lanewise @ bci:3 (line 42) Byte256VectorTests::ABSMaskedByte256VectorTests @ bci:107 (line 5261)
  668  If  === 652 667  [[ 669 670 ]] P=0.010156, C=23040.000000 !jvms: Byte256VectorTests::ABSMaskedByte256VectorTests @ bci:86 (line 5259)
 2162  If  === 2152 2161  [[ 2163 2164 ]] P=0.989844, C=22806.000000 !jvms: Byte256VectorTests::ABSMaskedByte256VectorTests @ bci:86 (line 5259)
  562  CastPP  === 561 2970  [[ 593 570 587 ]]  #jdk/internal/vm/vector/VectorSupport$VectorPayload:NotNull *  Oop:jdk/internal/vm/vector/VectorSupport$VectorPayload:NotNull * !jvms: VectorMask::fromArray @ bci:50 (line 212) Byte256VectorTests::ABSMaskedByte256VectorTests @ bci:63 (line 5256)
 2884  IfFalse  === 2883  [[ 587 611 3041 ]] #0 !orig=[585] !jvms: VectorMask::fromArray @ bci:50 (line 212) Byte256VectorTests::ABSMaskedByte256VectorTests @ bci:63 (line 5256)
 1179  InlineType  === _ 51 34 1181  [[ 1178 ]]  #jdk/internal/vm/vector/VectorSupport$VectorPayloadMF256Z:NotNull:exact *  Oop:jdk/internal/vm/vector/VectorSupport$VectorPayloadMF256Z:NotNull:exact * !jvms: Byte256Vector::lanewise @ bci:5 (line 279) Byte256Vector::lanewise @ bci:3 (line 42) Byte256VectorTests::ABSMaskedByte256VectorTests @ bci:107 (line 5261)
   34  ConI  === 0  [[ 2503 2257 2245 2233 2171 1823 1822 1179 1178 1081 1080 698 609 622 635 674 686 3019 3018 2969 2970 2994 2995 1801 3033 3037 3042 ]]  #int:1
 1177  CheckCastPP  === 2876 587  [[ 1178 1180 1180 3034 ]]  #jdk/incubator/vector/Byte256Vector$Byte256Mask:NotNull:exact *  Oop:jdk/incubator/vector/Byte256Vector$Byte256Mask:NotNull:exact * !jvms: Byte256Vector::lanewise @ bci:5 (line 279) Byte256Vector::lanewise @ bci:3 (line 42) Byte256VectorTests::ABSMaskedByte256VectorTests @ bci:107 (line 5261)
  669  IfTrue  === 668  [[ 673 ]] #1 !jvms: Byte256VectorTests::ABSMaskedByte256VectorTests @ bci:86 (line 5259)
 2164  IfFalse  === 2162  [[ 673 ]] #0 !jvms: Byte256VectorTests::ABSMaskedByte256VectorTests @ bci:86 (line 5259)
  587  CheckCastPP  === 2884 562  [[ 1828 1808 3002 1184 616 629 642 1177 2170 680 692 704 1169 1169 788 801 2978 1066 1086 1184 ]]  #jdk/incubator/vector/VectorMask:NotNull *  Oop:jdk/incubator/vector/VectorMask:NotNull * !jvms: VectorMask::fromArray @ bci:50 (line 212) Byte256VectorTests::ABSMaskedByte256VectorTests @ bci:63 (line 5256)
 1178  InlineType  === _ 1177 34 1179  [[ 2152 2170 3002 1969 1956 ]]  #jdk/incubator/vector/Byte256Vector$Byte256Mask:NotNull:exact *  Oop:jdk/incubator/vector/Byte256Vector$Byte256Mask:NotNull:exact * !jvms: Byte256Vector::lanewise @ bci:5 (line 279) Byte256Vector::lanewise @ bci:3 (line 42) Byte256VectorTests::ABSMaskedByte256VectorTests @ bci:107 (line 5261)
  673  Region  === 673 2164 669  [[ 673 2176 2167 2168 2893 2170 2172 3034 3036 3037 3038 ]]  !jvms: Byte256VectorTests::ABSMaskedByte256VectorTests @ bci:132 (line 5258)
 2170  Phi  === 673 1178 587  [[ ]]  #jdk/incubator/vector/VectorMask:NotNull *  Oop:jdk/incubator/vector/VectorMask:NotNull * !jvms: Byte256VectorTests::ABSMaskedByte256VectorTests @ bci:86 (line 5259)


Can you check why are we injecting InlineTypeNode in first (Byte256Mask) input of  Phi, when phi itself is an oop. I suspect this could be an artifact of moving functionality into AbstractMask.java

-------------

PR Review Comment: https://git.openjdk.org/valhalla/pull/845#discussion_r1208974675



More information about the valhalla-dev mailing list