1// Code generated from _gen/PPC64.rules using 'go generate'; DO NOT EDIT.23package ppc6445import "internal/buildcfg"6import "math"7import "cmd/compile/internal/types"8import "cmd/compile/internal/ssa/block"9import "cmd/compile/internal/ssa/ssaop"10import "cmd/compile/internal/ssa"1112func RewriteValue(v *ssa.Value) bool {13 switch v.Op {14 case ssaop.OpAbs:15 v.Op = ssaop.OpPPC64FABS16 return true17 case ssaop.OpAdd16:18 v.Op = ssaop.OpPPC64ADD19 return true20 case ssaop.OpAdd32:21 v.Op = ssaop.OpPPC64ADD22 return true23 case ssaop.OpAdd32F:24 v.Op = ssaop.OpPPC64FADDS25 return true26 case ssaop.OpAdd64:27 v.Op = ssaop.OpPPC64ADD28 return true29 case ssaop.OpAdd64F:30 v.Op = ssaop.OpPPC64FADD31 return true32 case ssaop.OpAdd8:33 v.Op = ssaop.OpPPC64ADD34 return true35 case ssaop.OpAddPtr:36 v.Op = ssaop.OpPPC64ADD37 return true38 case ssaop.OpAddr:39 return rewriteValue_OpAddr(v)40 case ssaop.OpAnd16:41 v.Op = ssaop.OpPPC64AND42 return true43 case ssaop.OpAnd32:44 v.Op = ssaop.OpPPC64AND45 return true46 case ssaop.OpAnd64:47 v.Op = ssaop.OpPPC64AND48 return true49 case ssaop.OpAnd8:50 v.Op = ssaop.OpPPC64AND51 return true52 case ssaop.OpAndB:53 v.Op = ssaop.OpPPC64AND54 return true55 case ssaop.OpAtomicAdd32:56 v.Op = ssaop.OpPPC64LoweredAtomicAdd3257 return true58 case ssaop.OpAtomicAdd64:59 v.Op = ssaop.OpPPC64LoweredAtomicAdd6460 return true61 case ssaop.OpAtomicAnd32:62 v.Op = ssaop.OpPPC64LoweredAtomicAnd3263 return true64 case ssaop.OpAtomicAnd8:65 v.Op = ssaop.OpPPC64LoweredAtomicAnd866 return true67 case ssaop.OpAtomicCompareAndSwap32:68 return rewriteValue_OpAtomicCompareAndSwap32(v)69 case ssaop.OpAtomicCompareAndSwap64:70 return rewriteValue_OpAtomicCompareAndSwap64(v)71 case ssaop.OpAtomicCompareAndSwapRel32:72 return rewriteValue_OpAtomicCompareAndSwapRel32(v)73 case ssaop.OpAtomicExchange32:74 v.Op = ssaop.OpPPC64LoweredAtomicExchange3275 return true76 case ssaop.OpAtomicExchange64:77 v.Op = ssaop.OpPPC64LoweredAtomicExchange6478 return true79 case ssaop.OpAtomicExchange8:80 v.Op = ssaop.OpPPC64LoweredAtomicExchange881 return true82 case ssaop.OpAtomicLoad32:83 return rewriteValue_OpAtomicLoad32(v)84 case ssaop.OpAtomicLoad64:85 return rewriteValue_OpAtomicLoad64(v)86 case ssaop.OpAtomicLoad8:87 return rewriteValue_OpAtomicLoad8(v)88 case ssaop.OpAtomicLoadAcq32:89 return rewriteValue_OpAtomicLoadAcq32(v)90 case ssaop.OpAtomicLoadAcq64:91 return rewriteValue_OpAtomicLoadAcq64(v)92 case ssaop.OpAtomicLoadPtr:93 return rewriteValue_OpAtomicLoadPtr(v)94 case ssaop.OpAtomicOr32:95 v.Op = ssaop.OpPPC64LoweredAtomicOr3296 return true97 case ssaop.OpAtomicOr8:98 v.Op = ssaop.OpPPC64LoweredAtomicOr899 return true100 case ssaop.OpAtomicStore32:101 return rewriteValue_OpAtomicStore32(v)102 case ssaop.OpAtomicStore64:103 return rewriteValue_OpAtomicStore64(v)104 case ssaop.OpAtomicStore8:105 return rewriteValue_OpAtomicStore8(v)106 case ssaop.OpAtomicStoreRel32:107 return rewriteValue_OpAtomicStoreRel32(v)108 case ssaop.OpAtomicStoreRel64:109 return rewriteValue_OpAtomicStoreRel64(v)110 case ssaop.OpAvg64u:111 return rewriteValue_OpAvg64u(v)112 case ssaop.OpBitLen16:113 return rewriteValue_OpBitLen16(v)114 case ssaop.OpBitLen32:115 return rewriteValue_OpBitLen32(v)116 case ssaop.OpBitLen64:117 return rewriteValue_OpBitLen64(v)118 case ssaop.OpBitLen8:119 return rewriteValue_OpBitLen8(v)120 case ssaop.OpBswap16:121 return rewriteValue_OpBswap16(v)122 case ssaop.OpBswap32:123 return rewriteValue_OpBswap32(v)124 case ssaop.OpBswap64:125 return rewriteValue_OpBswap64(v)126 case ssaop.OpCeil:127 v.Op = ssaop.OpPPC64FCEIL128 return true129 case ssaop.OpClosureCall:130 v.Op = ssaop.OpPPC64CALLclosure131 return true132 case ssaop.OpCom16:133 return rewriteValue_OpCom16(v)134 case ssaop.OpCom32:135 return rewriteValue_OpCom32(v)136 case ssaop.OpCom64:137 return rewriteValue_OpCom64(v)138 case ssaop.OpCom8:139 return rewriteValue_OpCom8(v)140 case ssaop.OpCondSelect:141 return rewriteValue_OpCondSelect(v)142 case ssaop.OpConst16:143 return rewriteValue_OpConst16(v)144 case ssaop.OpConst32:145 return rewriteValue_OpConst32(v)146 case ssaop.OpConst32F:147 v.Op = ssaop.OpPPC64FMOVSconst148 return true149 case ssaop.OpConst64:150 return rewriteValue_OpConst64(v)151 case ssaop.OpConst64F:152 v.Op = ssaop.OpPPC64FMOVDconst153 return true154 case ssaop.OpConst8:155 return rewriteValue_OpConst8(v)156 case ssaop.OpConstBool:157 return rewriteValue_OpConstBool(v)158 case ssaop.OpConstNil:159 return rewriteValue_OpConstNil(v)160 case ssaop.OpCopysign:161 return rewriteValue_OpCopysign(v)162 case ssaop.OpCtz16:163 return rewriteValue_OpCtz16(v)164 case ssaop.OpCtz16NonZero:165 v.Op = ssaop.OpCtz64166 return true167 case ssaop.OpCtz32:168 return rewriteValue_OpCtz32(v)169 case ssaop.OpCtz32NonZero:170 v.Op = ssaop.OpCtz64171 return true172 case ssaop.OpCtz64:173 return rewriteValue_OpCtz64(v)174 case ssaop.OpCtz64NonZero:175 v.Op = ssaop.OpCtz64176 return true177 case ssaop.OpCtz8:178 return rewriteValue_OpCtz8(v)179 case ssaop.OpCtz8NonZero:180 v.Op = ssaop.OpCtz64181 return true182 case ssaop.OpCvt32Fto32:183 return rewriteValue_OpCvt32Fto32(v)184 case ssaop.OpCvt32Fto64:185 return rewriteValue_OpCvt32Fto64(v)186 case ssaop.OpCvt32Fto64F:187 v.Op = ssaop.OpCopy188 return true189 case ssaop.OpCvt32to32F:190 return rewriteValue_OpCvt32to32F(v)191 case ssaop.OpCvt32to64F:192 return rewriteValue_OpCvt32to64F(v)193 case ssaop.OpCvt64Fto32:194 return rewriteValue_OpCvt64Fto32(v)195 case ssaop.OpCvt64Fto32F:196 v.Op = ssaop.OpPPC64FRSP197 return true198 case ssaop.OpCvt64Fto64:199 return rewriteValue_OpCvt64Fto64(v)200 case ssaop.OpCvt64to32F:201 return rewriteValue_OpCvt64to32F(v)202 case ssaop.OpCvt64to64F:203 return rewriteValue_OpCvt64to64F(v)204 case ssaop.OpCvtBoolToUint8:205 v.Op = ssaop.OpCopy206 return true207 case ssaop.OpDiv16:208 return rewriteValue_OpDiv16(v)209 case ssaop.OpDiv16u:210 return rewriteValue_OpDiv16u(v)211 case ssaop.OpDiv32:212 return rewriteValue_OpDiv32(v)213 case ssaop.OpDiv32F:214 v.Op = ssaop.OpPPC64FDIVS215 return true216 case ssaop.OpDiv32u:217 v.Op = ssaop.OpPPC64DIVWU218 return true219 case ssaop.OpDiv64:220 return rewriteValue_OpDiv64(v)221 case ssaop.OpDiv64F:222 v.Op = ssaop.OpPPC64FDIV223 return true224 case ssaop.OpDiv64u:225 v.Op = ssaop.OpPPC64DIVDU226 return true227 case ssaop.OpDiv8:228 return rewriteValue_OpDiv8(v)229 case ssaop.OpDiv8u:230 return rewriteValue_OpDiv8u(v)231 case ssaop.OpEq16:232 return rewriteValue_OpEq16(v)233 case ssaop.OpEq32:234 return rewriteValue_OpEq32(v)235 case ssaop.OpEq32F:236 return rewriteValue_OpEq32F(v)237 case ssaop.OpEq64:238 return rewriteValue_OpEq64(v)239 case ssaop.OpEq64F:240 return rewriteValue_OpEq64F(v)241 case ssaop.OpEq8:242 return rewriteValue_OpEq8(v)243 case ssaop.OpEqB:244 return rewriteValue_OpEqB(v)245 case ssaop.OpEqPtr:246 return rewriteValue_OpEqPtr(v)247 case ssaop.OpFMA:248 v.Op = ssaop.OpPPC64FMADD249 return true250 case ssaop.OpFloor:251 v.Op = ssaop.OpPPC64FFLOOR252 return true253 case ssaop.OpGetCallerPC:254 v.Op = ssaop.OpPPC64LoweredGetCallerPC255 return true256 case ssaop.OpGetCallerSP:257 v.Op = ssaop.OpPPC64LoweredGetCallerSP258 return true259 case ssaop.OpGetClosurePtr:260 v.Op = ssaop.OpPPC64LoweredGetClosurePtr261 return true262 case ssaop.OpHmul32:263 v.Op = ssaop.OpPPC64MULHW264 return true265 case ssaop.OpHmul32u:266 v.Op = ssaop.OpPPC64MULHWU267 return true268 case ssaop.OpHmul64:269 v.Op = ssaop.OpPPC64MULHD270 return true271 case ssaop.OpHmul64u:272 v.Op = ssaop.OpPPC64MULHDU273 return true274 case ssaop.OpInterCall:275 v.Op = ssaop.OpPPC64CALLinter276 return true277 case ssaop.OpIsInBounds:278 return rewriteValue_OpIsInBounds(v)279 case ssaop.OpIsNonNil:280 return rewriteValue_OpIsNonNil(v)281 case ssaop.OpIsSliceInBounds:282 return rewriteValue_OpIsSliceInBounds(v)283 case ssaop.OpLeq16:284 return rewriteValue_OpLeq16(v)285 case ssaop.OpLeq16U:286 return rewriteValue_OpLeq16U(v)287 case ssaop.OpLeq32:288 return rewriteValue_OpLeq32(v)289 case ssaop.OpLeq32F:290 return rewriteValue_OpLeq32F(v)291 case ssaop.OpLeq32U:292 return rewriteValue_OpLeq32U(v)293 case ssaop.OpLeq64:294 return rewriteValue_OpLeq64(v)295 case ssaop.OpLeq64F:296 return rewriteValue_OpLeq64F(v)297 case ssaop.OpLeq64U:298 return rewriteValue_OpLeq64U(v)299 case ssaop.OpLeq8:300 return rewriteValue_OpLeq8(v)301 case ssaop.OpLeq8U:302 return rewriteValue_OpLeq8U(v)303 case ssaop.OpLess16:304 return rewriteValue_OpLess16(v)305 case ssaop.OpLess16U:306 return rewriteValue_OpLess16U(v)307 case ssaop.OpLess32:308 return rewriteValue_OpLess32(v)309 case ssaop.OpLess32F:310 return rewriteValue_OpLess32F(v)311 case ssaop.OpLess32U:312 return rewriteValue_OpLess32U(v)313 case ssaop.OpLess64:314 return rewriteValue_OpLess64(v)315 case ssaop.OpLess64F:316 return rewriteValue_OpLess64F(v)317 case ssaop.OpLess64U:318 return rewriteValue_OpLess64U(v)319 case ssaop.OpLess8:320 return rewriteValue_OpLess8(v)321 case ssaop.OpLess8U:322 return rewriteValue_OpLess8U(v)323 case ssaop.OpLoad:324 return rewriteValue_OpLoad(v)325 case ssaop.OpLocalAddr:326 return rewriteValue_OpLocalAddr(v)327 case ssaop.OpLsh16x16:328 return rewriteValue_OpLsh16x16(v)329 case ssaop.OpLsh16x32:330 return rewriteValue_OpLsh16x32(v)331 case ssaop.OpLsh16x64:332 return rewriteValue_OpLsh16x64(v)333 case ssaop.OpLsh16x8:334 return rewriteValue_OpLsh16x8(v)335 case ssaop.OpLsh32x16:336 return rewriteValue_OpLsh32x16(v)337 case ssaop.OpLsh32x32:338 return rewriteValue_OpLsh32x32(v)339 case ssaop.OpLsh32x64:340 return rewriteValue_OpLsh32x64(v)341 case ssaop.OpLsh32x8:342 return rewriteValue_OpLsh32x8(v)343 case ssaop.OpLsh64x16:344 return rewriteValue_OpLsh64x16(v)345 case ssaop.OpLsh64x32:346 return rewriteValue_OpLsh64x32(v)347 case ssaop.OpLsh64x64:348 return rewriteValue_OpLsh64x64(v)349 case ssaop.OpLsh64x8:350 return rewriteValue_OpLsh64x8(v)351 case ssaop.OpLsh8x16:352 return rewriteValue_OpLsh8x16(v)353 case ssaop.OpLsh8x32:354 return rewriteValue_OpLsh8x32(v)355 case ssaop.OpLsh8x64:356 return rewriteValue_OpLsh8x64(v)357 case ssaop.OpLsh8x8:358 return rewriteValue_OpLsh8x8(v)359 case ssaop.OpMax32F:360 return rewriteValue_OpMax32F(v)361 case ssaop.OpMax64F:362 return rewriteValue_OpMax64F(v)363 case ssaop.OpMin32F:364 return rewriteValue_OpMin32F(v)365 case ssaop.OpMin64F:366 return rewriteValue_OpMin64F(v)367 case ssaop.OpMod16:368 return rewriteValue_OpMod16(v)369 case ssaop.OpMod16u:370 return rewriteValue_OpMod16u(v)371 case ssaop.OpMod32:372 return rewriteValue_OpMod32(v)373 case ssaop.OpMod32u:374 return rewriteValue_OpMod32u(v)375 case ssaop.OpMod64:376 return rewriteValue_OpMod64(v)377 case ssaop.OpMod64u:378 return rewriteValue_OpMod64u(v)379 case ssaop.OpMod8:380 return rewriteValue_OpMod8(v)381 case ssaop.OpMod8u:382 return rewriteValue_OpMod8u(v)383 case ssaop.OpMove:384 return rewriteValue_OpMove(v)385 case ssaop.OpMul16:386 v.Op = ssaop.OpPPC64MULLW387 return true388 case ssaop.OpMul32:389 v.Op = ssaop.OpPPC64MULLW390 return true391 case ssaop.OpMul32F:392 v.Op = ssaop.OpPPC64FMULS393 return true394 case ssaop.OpMul64:395 v.Op = ssaop.OpPPC64MULLD396 return true397 case ssaop.OpMul64F:398 v.Op = ssaop.OpPPC64FMUL399 return true400 case ssaop.OpMul8:401 v.Op = ssaop.OpPPC64MULLW402 return true403 case ssaop.OpNeg16:404 v.Op = ssaop.OpPPC64NEG405 return true406 case ssaop.OpNeg32:407 v.Op = ssaop.OpPPC64NEG408 return true409 case ssaop.OpNeg32F:410 v.Op = ssaop.OpPPC64FNEG411 return true412 case ssaop.OpNeg64:413 v.Op = ssaop.OpPPC64NEG414 return true415 case ssaop.OpNeg64F:416 v.Op = ssaop.OpPPC64FNEG417 return true418 case ssaop.OpNeg8:419 v.Op = ssaop.OpPPC64NEG420 return true421 case ssaop.OpNeq16:422 return rewriteValue_OpNeq16(v)423 case ssaop.OpNeq32:424 return rewriteValue_OpNeq32(v)425 case ssaop.OpNeq32F:426 return rewriteValue_OpNeq32F(v)427 case ssaop.OpNeq64:428 return rewriteValue_OpNeq64(v)429 case ssaop.OpNeq64F:430 return rewriteValue_OpNeq64F(v)431 case ssaop.OpNeq8:432 return rewriteValue_OpNeq8(v)433 case ssaop.OpNeqB:434 v.Op = ssaop.OpPPC64XOR435 return true436 case ssaop.OpNeqPtr:437 return rewriteValue_OpNeqPtr(v)438 case ssaop.OpNilCheck:439 v.Op = ssaop.OpPPC64LoweredNilCheck440 return true441 case ssaop.OpNot:442 return rewriteValue_OpNot(v)443 case ssaop.OpOffPtr:444 return rewriteValue_OpOffPtr(v)445 case ssaop.OpOr16:446 v.Op = ssaop.OpPPC64OR447 return true448 case ssaop.OpOr32:449 v.Op = ssaop.OpPPC64OR450 return true451 case ssaop.OpOr64:452 v.Op = ssaop.OpPPC64OR453 return true454 case ssaop.OpOr8:455 v.Op = ssaop.OpPPC64OR456 return true457 case ssaop.OpOrB:458 v.Op = ssaop.OpPPC64OR459 return true460 case ssaop.OpPPC64ADD:461 return rewriteValue_OpPPC64ADD(v)462 case ssaop.OpPPC64ADDC:463 return rewriteValue_OpPPC64ADDC(v)464 case ssaop.OpPPC64ADDE:465 return rewriteValue_OpPPC64ADDE(v)466 case ssaop.OpPPC64ADDconst:467 return rewriteValue_OpPPC64ADDconst(v)468 case ssaop.OpPPC64AND:469 return rewriteValue_OpPPC64AND(v)470 case ssaop.OpPPC64ANDN:471 return rewriteValue_OpPPC64ANDN(v)472 case ssaop.OpPPC64ANDconst:473 return rewriteValue_OpPPC64ANDconst(v)474 case ssaop.OpPPC64BRD:475 return rewriteValue_OpPPC64BRD(v)476 case ssaop.OpPPC64BRH:477 return rewriteValue_OpPPC64BRH(v)478 case ssaop.OpPPC64BRW:479 return rewriteValue_OpPPC64BRW(v)480 case ssaop.OpPPC64CLRLSLDI:481 return rewriteValue_OpPPC64CLRLSLDI(v)482 case ssaop.OpPPC64CMP:483 return rewriteValue_OpPPC64CMP(v)484 case ssaop.OpPPC64CMPU:485 return rewriteValue_OpPPC64CMPU(v)486 case ssaop.OpPPC64CMPUconst:487 return rewriteValue_OpPPC64CMPUconst(v)488 case ssaop.OpPPC64CMPW:489 return rewriteValue_OpPPC64CMPW(v)490 case ssaop.OpPPC64CMPWU:491 return rewriteValue_OpPPC64CMPWU(v)492 case ssaop.OpPPC64CMPWUconst:493 return rewriteValue_OpPPC64CMPWUconst(v)494 case ssaop.OpPPC64CMPWconst:495 return rewriteValue_OpPPC64CMPWconst(v)496 case ssaop.OpPPC64CMPconst:497 return rewriteValue_OpPPC64CMPconst(v)498 case ssaop.OpPPC64Equal:499 return rewriteValue_OpPPC64Equal(v)500 case ssaop.OpPPC64FABS:501 return rewriteValue_OpPPC64FABS(v)502 case ssaop.OpPPC64FADD:503 return rewriteValue_OpPPC64FADD(v)504 case ssaop.OpPPC64FADDS:505 return rewriteValue_OpPPC64FADDS(v)506 case ssaop.OpPPC64FCEIL:507 return rewriteValue_OpPPC64FCEIL(v)508 case ssaop.OpPPC64FFLOOR:509 return rewriteValue_OpPPC64FFLOOR(v)510 case ssaop.OpPPC64FGreaterEqual:511 return rewriteValue_OpPPC64FGreaterEqual(v)512 case ssaop.OpPPC64FGreaterThan:513 return rewriteValue_OpPPC64FGreaterThan(v)514 case ssaop.OpPPC64FLessEqual:515 return rewriteValue_OpPPC64FLessEqual(v)516 case ssaop.OpPPC64FLessThan:517 return rewriteValue_OpPPC64FLessThan(v)518 case ssaop.OpPPC64FMOVDload:519 return rewriteValue_OpPPC64FMOVDload(v)520 case ssaop.OpPPC64FMOVDstore:521 return rewriteValue_OpPPC64FMOVDstore(v)522 case ssaop.OpPPC64FMOVSload:523 return rewriteValue_OpPPC64FMOVSload(v)524 case ssaop.OpPPC64FMOVSstore:525 return rewriteValue_OpPPC64FMOVSstore(v)526 case ssaop.OpPPC64FNEG:527 return rewriteValue_OpPPC64FNEG(v)528 case ssaop.OpPPC64FSQRT:529 return rewriteValue_OpPPC64FSQRT(v)530 case ssaop.OpPPC64FSUB:531 return rewriteValue_OpPPC64FSUB(v)532 case ssaop.OpPPC64FSUBS:533 return rewriteValue_OpPPC64FSUBS(v)534 case ssaop.OpPPC64FTRUNC:535 return rewriteValue_OpPPC64FTRUNC(v)536 case ssaop.OpPPC64GreaterEqual:537 return rewriteValue_OpPPC64GreaterEqual(v)538 case ssaop.OpPPC64GreaterThan:539 return rewriteValue_OpPPC64GreaterThan(v)540 case ssaop.OpPPC64ISEL:541 return rewriteValue_OpPPC64ISEL(v)542 case ssaop.OpPPC64LessEqual:543 return rewriteValue_OpPPC64LessEqual(v)544 case ssaop.OpPPC64LessThan:545 return rewriteValue_OpPPC64LessThan(v)546 case ssaop.OpPPC64LoweredPanicBoundsCR:547 return rewriteValue_OpPPC64LoweredPanicBoundsCR(v)548 case ssaop.OpPPC64LoweredPanicBoundsRC:549 return rewriteValue_OpPPC64LoweredPanicBoundsRC(v)550 case ssaop.OpPPC64LoweredPanicBoundsRR:551 return rewriteValue_OpPPC64LoweredPanicBoundsRR(v)552 case ssaop.OpPPC64MFVSRD:553 return rewriteValue_OpPPC64MFVSRD(v)554 case ssaop.OpPPC64MOVBZload:555 return rewriteValue_OpPPC64MOVBZload(v)556 case ssaop.OpPPC64MOVBZloadidx:557 return rewriteValue_OpPPC64MOVBZloadidx(v)558 case ssaop.OpPPC64MOVBZreg:559 return rewriteValue_OpPPC64MOVBZreg(v)560 case ssaop.OpPPC64MOVBreg:561 return rewriteValue_OpPPC64MOVBreg(v)562 case ssaop.OpPPC64MOVBstore:563 return rewriteValue_OpPPC64MOVBstore(v)564 case ssaop.OpPPC64MOVBstoreidx:565 return rewriteValue_OpPPC64MOVBstoreidx(v)566 case ssaop.OpPPC64MOVBstorezero:567 return rewriteValue_OpPPC64MOVBstorezero(v)568 case ssaop.OpPPC64MOVDaddr:569 return rewriteValue_OpPPC64MOVDaddr(v)570 case ssaop.OpPPC64MOVDload:571 return rewriteValue_OpPPC64MOVDload(v)572 case ssaop.OpPPC64MOVDloadidx:573 return rewriteValue_OpPPC64MOVDloadidx(v)574 case ssaop.OpPPC64MOVDstore:575 return rewriteValue_OpPPC64MOVDstore(v)576 case ssaop.OpPPC64MOVDstoreidx:577 return rewriteValue_OpPPC64MOVDstoreidx(v)578 case ssaop.OpPPC64MOVDstorezero:579 return rewriteValue_OpPPC64MOVDstorezero(v)580 case ssaop.OpPPC64MOVHBRstore:581 return rewriteValue_OpPPC64MOVHBRstore(v)582 case ssaop.OpPPC64MOVHZload:583 return rewriteValue_OpPPC64MOVHZload(v)584 case ssaop.OpPPC64MOVHZloadidx:585 return rewriteValue_OpPPC64MOVHZloadidx(v)586 case ssaop.OpPPC64MOVHZreg:587 return rewriteValue_OpPPC64MOVHZreg(v)588 case ssaop.OpPPC64MOVHload:589 return rewriteValue_OpPPC64MOVHload(v)590 case ssaop.OpPPC64MOVHloadidx:591 return rewriteValue_OpPPC64MOVHloadidx(v)592 case ssaop.OpPPC64MOVHreg:593 return rewriteValue_OpPPC64MOVHreg(v)594 case ssaop.OpPPC64MOVHstore:595 return rewriteValue_OpPPC64MOVHstore(v)596 case ssaop.OpPPC64MOVHstoreidx:597 return rewriteValue_OpPPC64MOVHstoreidx(v)598 case ssaop.OpPPC64MOVHstorezero:599 return rewriteValue_OpPPC64MOVHstorezero(v)600 case ssaop.OpPPC64MOVWBRstore:601 return rewriteValue_OpPPC64MOVWBRstore(v)602 case ssaop.OpPPC64MOVWZload:603 return rewriteValue_OpPPC64MOVWZload(v)604 case ssaop.OpPPC64MOVWZloadidx:605 return rewriteValue_OpPPC64MOVWZloadidx(v)606 case ssaop.OpPPC64MOVWZreg:607 return rewriteValue_OpPPC64MOVWZreg(v)608 case ssaop.OpPPC64MOVWload:609 return rewriteValue_OpPPC64MOVWload(v)610 case ssaop.OpPPC64MOVWloadidx:611 return rewriteValue_OpPPC64MOVWloadidx(v)612 case ssaop.OpPPC64MOVWreg:613 return rewriteValue_OpPPC64MOVWreg(v)614 case ssaop.OpPPC64MOVWstore:615 return rewriteValue_OpPPC64MOVWstore(v)616 case ssaop.OpPPC64MOVWstoreidx:617 return rewriteValue_OpPPC64MOVWstoreidx(v)618 case ssaop.OpPPC64MOVWstorezero:619 return rewriteValue_OpPPC64MOVWstorezero(v)620 case ssaop.OpPPC64MTVSRD:621 return rewriteValue_OpPPC64MTVSRD(v)622 case ssaop.OpPPC64MULLD:623 return rewriteValue_OpPPC64MULLD(v)624 case ssaop.OpPPC64MULLW:625 return rewriteValue_OpPPC64MULLW(v)626 case ssaop.OpPPC64NEG:627 return rewriteValue_OpPPC64NEG(v)628 case ssaop.OpPPC64NOR:629 return rewriteValue_OpPPC64NOR(v)630 case ssaop.OpPPC64NotEqual:631 return rewriteValue_OpPPC64NotEqual(v)632 case ssaop.OpPPC64OR:633 return rewriteValue_OpPPC64OR(v)634 case ssaop.OpPPC64ORN:635 return rewriteValue_OpPPC64ORN(v)636 case ssaop.OpPPC64ORconst:637 return rewriteValue_OpPPC64ORconst(v)638 case ssaop.OpPPC64RLWINM:639 return rewriteValue_OpPPC64RLWINM(v)640 case ssaop.OpPPC64ROTL:641 return rewriteValue_OpPPC64ROTL(v)642 case ssaop.OpPPC64ROTLW:643 return rewriteValue_OpPPC64ROTLW(v)644 case ssaop.OpPPC64ROTLWconst:645 return rewriteValue_OpPPC64ROTLWconst(v)646 case ssaop.OpPPC64SETBC:647 return rewriteValue_OpPPC64SETBC(v)648 case ssaop.OpPPC64SETBCR:649 return rewriteValue_OpPPC64SETBCR(v)650 case ssaop.OpPPC64SLD:651 return rewriteValue_OpPPC64SLD(v)652 case ssaop.OpPPC64SLDconst:653 return rewriteValue_OpPPC64SLDconst(v)654 case ssaop.OpPPC64SLW:655 return rewriteValue_OpPPC64SLW(v)656 case ssaop.OpPPC64SLWconst:657 return rewriteValue_OpPPC64SLWconst(v)658 case ssaop.OpPPC64SRAD:659 return rewriteValue_OpPPC64SRAD(v)660 case ssaop.OpPPC64SRAW:661 return rewriteValue_OpPPC64SRAW(v)662 case ssaop.OpPPC64SRD:663 return rewriteValue_OpPPC64SRD(v)664 case ssaop.OpPPC64SRW:665 return rewriteValue_OpPPC64SRW(v)666 case ssaop.OpPPC64SRWconst:667 return rewriteValue_OpPPC64SRWconst(v)668 case ssaop.OpPPC64SUB:669 return rewriteValue_OpPPC64SUB(v)670 case ssaop.OpPPC64SUBE:671 return rewriteValue_OpPPC64SUBE(v)672 case ssaop.OpPPC64SUBFCconst:673 return rewriteValue_OpPPC64SUBFCconst(v)674 case ssaop.OpPPC64XOR:675 return rewriteValue_OpPPC64XOR(v)676 case ssaop.OpPPC64XORconst:677 return rewriteValue_OpPPC64XORconst(v)678 case ssaop.OpPanicBounds:679 v.Op = ssaop.OpPPC64LoweredPanicBoundsRR680 return true681 case ssaop.OpPopCount16:682 return rewriteValue_OpPopCount16(v)683 case ssaop.OpPopCount32:684 return rewriteValue_OpPopCount32(v)685 case ssaop.OpPopCount64:686 v.Op = ssaop.OpPPC64POPCNTD687 return true688 case ssaop.OpPopCount8:689 return rewriteValue_OpPopCount8(v)690 case ssaop.OpPrefetchCache:691 return rewriteValue_OpPrefetchCache(v)692 case ssaop.OpPrefetchCacheStreamed:693 return rewriteValue_OpPrefetchCacheStreamed(v)694 case ssaop.OpPubBarrier:695 v.Op = ssaop.OpPPC64LoweredPubBarrier696 return true697 case ssaop.OpRotateLeft16:698 return rewriteValue_OpRotateLeft16(v)699 case ssaop.OpRotateLeft32:700 v.Op = ssaop.OpPPC64ROTLW701 return true702 case ssaop.OpRotateLeft64:703 v.Op = ssaop.OpPPC64ROTL704 return true705 case ssaop.OpRotateLeft8:706 return rewriteValue_OpRotateLeft8(v)707 case ssaop.OpRound:708 v.Op = ssaop.OpPPC64FROUND709 return true710 case ssaop.OpRound32F:711 v.Op = ssaop.OpPPC64LoweredRound32F712 return true713 case ssaop.OpRound64F:714 v.Op = ssaop.OpPPC64LoweredRound64F715 return true716 case ssaop.OpRsh16Ux16:717 return rewriteValue_OpRsh16Ux16(v)718 case ssaop.OpRsh16Ux32:719 return rewriteValue_OpRsh16Ux32(v)720 case ssaop.OpRsh16Ux64:721 return rewriteValue_OpRsh16Ux64(v)722 case ssaop.OpRsh16Ux8:723 return rewriteValue_OpRsh16Ux8(v)724 case ssaop.OpRsh16x16:725 return rewriteValue_OpRsh16x16(v)726 case ssaop.OpRsh16x32:727 return rewriteValue_OpRsh16x32(v)728 case ssaop.OpRsh16x64:729 return rewriteValue_OpRsh16x64(v)730 case ssaop.OpRsh16x8:731 return rewriteValue_OpRsh16x8(v)732 case ssaop.OpRsh32Ux16:733 return rewriteValue_OpRsh32Ux16(v)734 case ssaop.OpRsh32Ux32:735 return rewriteValue_OpRsh32Ux32(v)736 case ssaop.OpRsh32Ux64:737 return rewriteValue_OpRsh32Ux64(v)738 case ssaop.OpRsh32Ux8:739 return rewriteValue_OpRsh32Ux8(v)740 case ssaop.OpRsh32x16:741 return rewriteValue_OpRsh32x16(v)742 case ssaop.OpRsh32x32:743 return rewriteValue_OpRsh32x32(v)744 case ssaop.OpRsh32x64:745 return rewriteValue_OpRsh32x64(v)746 case ssaop.OpRsh32x8:747 return rewriteValue_OpRsh32x8(v)748 case ssaop.OpRsh64Ux16:749 return rewriteValue_OpRsh64Ux16(v)750 case ssaop.OpRsh64Ux32:751 return rewriteValue_OpRsh64Ux32(v)752 case ssaop.OpRsh64Ux64:753 return rewriteValue_OpRsh64Ux64(v)754 case ssaop.OpRsh64Ux8:755 return rewriteValue_OpRsh64Ux8(v)756 case ssaop.OpRsh64x16:757 return rewriteValue_OpRsh64x16(v)758 case ssaop.OpRsh64x32:759 return rewriteValue_OpRsh64x32(v)760 case ssaop.OpRsh64x64:761 return rewriteValue_OpRsh64x64(v)762 case ssaop.OpRsh64x8:763 return rewriteValue_OpRsh64x8(v)764 case ssaop.OpRsh8Ux16:765 return rewriteValue_OpRsh8Ux16(v)766 case ssaop.OpRsh8Ux32:767 return rewriteValue_OpRsh8Ux32(v)768 case ssaop.OpRsh8Ux64:769 return rewriteValue_OpRsh8Ux64(v)770 case ssaop.OpRsh8Ux8:771 return rewriteValue_OpRsh8Ux8(v)772 case ssaop.OpRsh8x16:773 return rewriteValue_OpRsh8x16(v)774 case ssaop.OpRsh8x32:775 return rewriteValue_OpRsh8x32(v)776 case ssaop.OpRsh8x64:777 return rewriteValue_OpRsh8x64(v)778 case ssaop.OpRsh8x8:779 return rewriteValue_OpRsh8x8(v)780 case ssaop.OpSelect0:781 return rewriteValue_OpSelect0(v)782 case ssaop.OpSelect1:783 return rewriteValue_OpSelect1(v)784 case ssaop.OpSelectN:785 return rewriteValue_OpSelectN(v)786 case ssaop.OpSignExt16to32:787 v.Op = ssaop.OpPPC64MOVHreg788 return true789 case ssaop.OpSignExt16to64:790 v.Op = ssaop.OpPPC64MOVHreg791 return true792 case ssaop.OpSignExt32to64:793 v.Op = ssaop.OpPPC64MOVWreg794 return true795 case ssaop.OpSignExt8to16:796 v.Op = ssaop.OpPPC64MOVBreg797 return true798 case ssaop.OpSignExt8to32:799 v.Op = ssaop.OpPPC64MOVBreg800 return true801 case ssaop.OpSignExt8to64:802 v.Op = ssaop.OpPPC64MOVBreg803 return true804 case ssaop.OpSlicemask:805 return rewriteValue_OpSlicemask(v)806 case ssaop.OpSqrt:807 v.Op = ssaop.OpPPC64FSQRT808 return true809 case ssaop.OpSqrt32:810 v.Op = ssaop.OpPPC64FSQRTS811 return true812 case ssaop.OpStaticCall:813 v.Op = ssaop.OpPPC64CALLstatic814 return true815 case ssaop.OpStore:816 return rewriteValue_OpStore(v)817 case ssaop.OpSub16:818 v.Op = ssaop.OpPPC64SUB819 return true820 case ssaop.OpSub32:821 v.Op = ssaop.OpPPC64SUB822 return true823 case ssaop.OpSub32F:824 v.Op = ssaop.OpPPC64FSUBS825 return true826 case ssaop.OpSub64:827 v.Op = ssaop.OpPPC64SUB828 return true829 case ssaop.OpSub64F:830 v.Op = ssaop.OpPPC64FSUB831 return true832 case ssaop.OpSub8:833 v.Op = ssaop.OpPPC64SUB834 return true835 case ssaop.OpSubPtr:836 v.Op = ssaop.OpPPC64SUB837 return true838 case ssaop.OpTailCall:839 v.Op = ssaop.OpPPC64CALLtail840 return true841 case ssaop.OpTailCallInter:842 v.Op = ssaop.OpPPC64CALLtailinter843 return true844 case ssaop.OpTrunc:845 v.Op = ssaop.OpPPC64FTRUNC846 return true847 case ssaop.OpTrunc16to8:848 return rewriteValue_OpTrunc16to8(v)849 case ssaop.OpTrunc32to16:850 return rewriteValue_OpTrunc32to16(v)851 case ssaop.OpTrunc32to8:852 return rewriteValue_OpTrunc32to8(v)853 case ssaop.OpTrunc64to16:854 return rewriteValue_OpTrunc64to16(v)855 case ssaop.OpTrunc64to32:856 return rewriteValue_OpTrunc64to32(v)857 case ssaop.OpTrunc64to8:858 return rewriteValue_OpTrunc64to8(v)859 case ssaop.OpWB:860 v.Op = ssaop.OpPPC64LoweredWB861 return true862 case ssaop.OpXor16:863 v.Op = ssaop.OpPPC64XOR864 return true865 case ssaop.OpXor32:866 v.Op = ssaop.OpPPC64XOR867 return true868 case ssaop.OpXor64:869 v.Op = ssaop.OpPPC64XOR870 return true871 case ssaop.OpXor8:872 v.Op = ssaop.OpPPC64XOR873 return true874 case ssaop.OpZero:875 return rewriteValue_OpZero(v)876 case ssaop.OpZeroExt16to32:877 v.Op = ssaop.OpPPC64MOVHZreg878 return true879 case ssaop.OpZeroExt16to64:880 v.Op = ssaop.OpPPC64MOVHZreg881 return true882 case ssaop.OpZeroExt32to64:883 v.Op = ssaop.OpPPC64MOVWZreg884 return true885 case ssaop.OpZeroExt8to16:886 v.Op = ssaop.OpPPC64MOVBZreg887 return true888 case ssaop.OpZeroExt8to32:889 v.Op = ssaop.OpPPC64MOVBZreg890 return true891 case ssaop.OpZeroExt8to64:892 v.Op = ssaop.OpPPC64MOVBZreg893 return true894 }895 return false896}897func rewriteValue_OpAddr(v *ssa.Value) bool {898 v_0 := v.Args[0]899 // match: (Addr {sym} base)900 // result: (MOVDaddr {sym} [0] base)901 for {902 sym := ssa.AuxToSym(v.Aux)903 base := v_0904 v.Reset(ssaop.OpPPC64MOVDaddr)905 v.AuxInt = ssa.Int32ToAuxInt(0)906 v.Aux = ssa.SymToAux(sym)907 v.AddArg(base)908 return true909 }910}911func rewriteValue_OpAtomicCompareAndSwap32(v *ssa.Value) bool {912 v_3 := v.Args[3]913 v_2 := v.Args[2]914 v_1 := v.Args[1]915 v_0 := v.Args[0]916 // match: (AtomicCompareAndSwap32 ptr old new_ mem)917 // result: (LoweredAtomicCas32 [1] ptr old new_ mem)918 for {919 ptr := v_0920 old := v_1921 new_ := v_2922 mem := v_3923 v.Reset(ssaop.OpPPC64LoweredAtomicCas32)924 v.AuxInt = ssa.Int64ToAuxInt(1)925 v.AddArg4(ptr, old, new_, mem)926 return true927 }928}929func rewriteValue_OpAtomicCompareAndSwap64(v *ssa.Value) bool {930 v_3 := v.Args[3]931 v_2 := v.Args[2]932 v_1 := v.Args[1]933 v_0 := v.Args[0]934 // match: (AtomicCompareAndSwap64 ptr old new_ mem)935 // result: (LoweredAtomicCas64 [1] ptr old new_ mem)936 for {937 ptr := v_0938 old := v_1939 new_ := v_2940 mem := v_3941 v.Reset(ssaop.OpPPC64LoweredAtomicCas64)942 v.AuxInt = ssa.Int64ToAuxInt(1)943 v.AddArg4(ptr, old, new_, mem)944 return true945 }946}947func rewriteValue_OpAtomicCompareAndSwapRel32(v *ssa.Value) bool {948 v_3 := v.Args[3]949 v_2 := v.Args[2]950 v_1 := v.Args[1]951 v_0 := v.Args[0]952 // match: (AtomicCompareAndSwapRel32 ptr old new_ mem)953 // result: (LoweredAtomicCas32 [0] ptr old new_ mem)954 for {955 ptr := v_0956 old := v_1957 new_ := v_2958 mem := v_3959 v.Reset(ssaop.OpPPC64LoweredAtomicCas32)960 v.AuxInt = ssa.Int64ToAuxInt(0)961 v.AddArg4(ptr, old, new_, mem)962 return true963 }964}965func rewriteValue_OpAtomicLoad32(v *ssa.Value) bool {966 v_1 := v.Args[1]967 v_0 := v.Args[0]968 // match: (AtomicLoad32 ptr mem)969 // result: (LoweredAtomicLoad32 [1] ptr mem)970 for {971 ptr := v_0972 mem := v_1973 v.Reset(ssaop.OpPPC64LoweredAtomicLoad32)974 v.AuxInt = ssa.Int64ToAuxInt(1)975 v.AddArg2(ptr, mem)976 return true977 }978}979func rewriteValue_OpAtomicLoad64(v *ssa.Value) bool {980 v_1 := v.Args[1]981 v_0 := v.Args[0]982 // match: (AtomicLoad64 ptr mem)983 // result: (LoweredAtomicLoad64 [1] ptr mem)984 for {985 ptr := v_0986 mem := v_1987 v.Reset(ssaop.OpPPC64LoweredAtomicLoad64)988 v.AuxInt = ssa.Int64ToAuxInt(1)989 v.AddArg2(ptr, mem)990 return true991 }992}993func rewriteValue_OpAtomicLoad8(v *ssa.Value) bool {994 v_1 := v.Args[1]995 v_0 := v.Args[0]996 // match: (AtomicLoad8 ptr mem)997 // result: (LoweredAtomicLoad8 [1] ptr mem)998 for {999 ptr := v_01000 mem := v_11001 v.Reset(ssaop.OpPPC64LoweredAtomicLoad8)1002 v.AuxInt = ssa.Int64ToAuxInt(1)1003 v.AddArg2(ptr, mem)1004 return true1005 }1006}1007func rewriteValue_OpAtomicLoadAcq32(v *ssa.Value) bool {1008 v_1 := v.Args[1]1009 v_0 := v.Args[0]1010 // match: (AtomicLoadAcq32 ptr mem)1011 // result: (LoweredAtomicLoad32 [0] ptr mem)1012 for {1013 ptr := v_01014 mem := v_11015 v.Reset(ssaop.OpPPC64LoweredAtomicLoad32)1016 v.AuxInt = ssa.Int64ToAuxInt(0)1017 v.AddArg2(ptr, mem)1018 return true1019 }1020}1021func rewriteValue_OpAtomicLoadAcq64(v *ssa.Value) bool {1022 v_1 := v.Args[1]1023 v_0 := v.Args[0]1024 // match: (AtomicLoadAcq64 ptr mem)1025 // result: (LoweredAtomicLoad64 [0] ptr mem)1026 for {1027 ptr := v_01028 mem := v_11029 v.Reset(ssaop.OpPPC64LoweredAtomicLoad64)1030 v.AuxInt = ssa.Int64ToAuxInt(0)1031 v.AddArg2(ptr, mem)1032 return true1033 }1034}1035func rewriteValue_OpAtomicLoadPtr(v *ssa.Value) bool {1036 v_1 := v.Args[1]1037 v_0 := v.Args[0]1038 // match: (AtomicLoadPtr ptr mem)1039 // result: (LoweredAtomicLoadPtr [1] ptr mem)1040 for {1041 ptr := v_01042 mem := v_11043 v.Reset(ssaop.OpPPC64LoweredAtomicLoadPtr)1044 v.AuxInt = ssa.Int64ToAuxInt(1)1045 v.AddArg2(ptr, mem)1046 return true1047 }1048}1049func rewriteValue_OpAtomicStore32(v *ssa.Value) bool {1050 v_2 := v.Args[2]1051 v_1 := v.Args[1]1052 v_0 := v.Args[0]1053 // match: (AtomicStore32 ptr val mem)1054 // result: (LoweredAtomicStore32 [1] ptr val mem)1055 for {1056 ptr := v_01057 val := v_11058 mem := v_21059 v.Reset(ssaop.OpPPC64LoweredAtomicStore32)1060 v.AuxInt = ssa.Int64ToAuxInt(1)1061 v.AddArg3(ptr, val, mem)1062 return true1063 }1064}1065func rewriteValue_OpAtomicStore64(v *ssa.Value) bool {1066 v_2 := v.Args[2]1067 v_1 := v.Args[1]1068 v_0 := v.Args[0]1069 // match: (AtomicStore64 ptr val mem)1070 // result: (LoweredAtomicStore64 [1] ptr val mem)1071 for {1072 ptr := v_01073 val := v_11074 mem := v_21075 v.Reset(ssaop.OpPPC64LoweredAtomicStore64)1076 v.AuxInt = ssa.Int64ToAuxInt(1)1077 v.AddArg3(ptr, val, mem)1078 return true1079 }1080}1081func rewriteValue_OpAtomicStore8(v *ssa.Value) bool {1082 v_2 := v.Args[2]1083 v_1 := v.Args[1]1084 v_0 := v.Args[0]1085 // match: (AtomicStore8 ptr val mem)1086 // result: (LoweredAtomicStore8 [1] ptr val mem)1087 for {1088 ptr := v_01089 val := v_11090 mem := v_21091 v.Reset(ssaop.OpPPC64LoweredAtomicStore8)1092 v.AuxInt = ssa.Int64ToAuxInt(1)1093 v.AddArg3(ptr, val, mem)1094 return true1095 }1096}1097func rewriteValue_OpAtomicStoreRel32(v *ssa.Value) bool {1098 v_2 := v.Args[2]1099 v_1 := v.Args[1]1100 v_0 := v.Args[0]1101 // match: (AtomicStoreRel32 ptr val mem)1102 // result: (LoweredAtomicStore32 [0] ptr val mem)1103 for {1104 ptr := v_01105 val := v_11106 mem := v_21107 v.Reset(ssaop.OpPPC64LoweredAtomicStore32)1108 v.AuxInt = ssa.Int64ToAuxInt(0)1109 v.AddArg3(ptr, val, mem)1110 return true1111 }1112}1113func rewriteValue_OpAtomicStoreRel64(v *ssa.Value) bool {1114 v_2 := v.Args[2]1115 v_1 := v.Args[1]1116 v_0 := v.Args[0]1117 // match: (AtomicStoreRel64 ptr val mem)1118 // result: (LoweredAtomicStore64 [0] ptr val mem)1119 for {1120 ptr := v_01121 val := v_11122 mem := v_21123 v.Reset(ssaop.OpPPC64LoweredAtomicStore64)1124 v.AuxInt = ssa.Int64ToAuxInt(0)1125 v.AddArg3(ptr, val, mem)1126 return true1127 }1128}1129func rewriteValue_OpAvg64u(v *ssa.Value) bool {1130 v_1 := v.Args[1]1131 v_0 := v.Args[0]1132 b := v.Block1133 // match: (Avg64u <t> x y)1134 // result: (ADD (SRDconst <t> (SUB <t> x y) [1]) y)1135 for {1136 t := v.Type1137 x := v_01138 y := v_11139 v.Reset(ssaop.OpPPC64ADD)1140 v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRDconst, t)1141 v0.AuxInt = ssa.Int64ToAuxInt(1)1142 v1 := b.NewValue0(v.Pos, ssaop.OpPPC64SUB, t)1143 v1.AddArg2(x, y)1144 v0.AddArg(v1)1145 v.AddArg2(v0, y)1146 return true1147 }1148}1149func rewriteValue_OpBitLen16(v *ssa.Value) bool {1150 v_0 := v.Args[0]1151 b := v.Block1152 typ := &b.Func.Config.Types1153 // match: (BitLen16 x)1154 // result: (BitLen64 (ZeroExt16to64 x))1155 for {1156 x := v_01157 v.Reset(ssaop.OpBitLen64)1158 v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)1159 v0.AddArg(x)1160 v.AddArg(v0)1161 return true1162 }1163}1164func rewriteValue_OpBitLen32(v *ssa.Value) bool {1165 v_0 := v.Args[0]1166 b := v.Block1167 typ := &b.Func.Config.Types1168 // match: (BitLen32 x)1169 // result: (SUBFCconst [32] (CNTLZW <typ.Int> x))1170 for {1171 x := v_01172 v.Reset(ssaop.OpPPC64SUBFCconst)1173 v.AuxInt = ssa.Int64ToAuxInt(32)1174 v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CNTLZW, typ.Int)1175 v0.AddArg(x)1176 v.AddArg(v0)1177 return true1178 }1179}1180func rewriteValue_OpBitLen64(v *ssa.Value) bool {1181 v_0 := v.Args[0]1182 b := v.Block1183 typ := &b.Func.Config.Types1184 // match: (BitLen64 x)1185 // result: (SUBFCconst [64] (CNTLZD <typ.Int> x))1186 for {1187 x := v_01188 v.Reset(ssaop.OpPPC64SUBFCconst)1189 v.AuxInt = ssa.Int64ToAuxInt(64)1190 v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CNTLZD, typ.Int)1191 v0.AddArg(x)1192 v.AddArg(v0)1193 return true1194 }1195}1196func rewriteValue_OpBitLen8(v *ssa.Value) bool {1197 v_0 := v.Args[0]1198 b := v.Block1199 typ := &b.Func.Config.Types1200 // match: (BitLen8 x)1201 // result: (BitLen64 (ZeroExt8to64 x))1202 for {1203 x := v_01204 v.Reset(ssaop.OpBitLen64)1205 v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)1206 v0.AddArg(x)1207 v.AddArg(v0)1208 return true1209 }1210}1211func rewriteValue_OpBswap16(v *ssa.Value) bool {1212 v_0 := v.Args[0]1213 b := v.Block1214 typ := &b.Func.Config.Types1215 // match: (Bswap16 x)1216 // cond: buildcfg.GOPPC64>=101217 // result: (BRH x)1218 for {1219 x := v_01220 if !(buildcfg.GOPPC64 >= 10) {1221 break1222 }1223 v.Reset(ssaop.OpPPC64BRH)1224 v.AddArg(x)1225 return true1226 }1227 // match: (Bswap16 x:(MOVHZload [off] {sym} ptr mem))1228 // result: @x.Block (MOVHBRload (MOVDaddr <ptr.Type> [off] {sym} ptr) mem)1229 for {1230 x := v_01231 if x.Op != ssaop.OpPPC64MOVHZload {1232 break1233 }1234 off := ssa.AuxIntToInt32(x.AuxInt)1235 sym := ssa.AuxToSym(x.Aux)1236 mem := x.Args[1]1237 ptr := x.Args[0]1238 b = x.Block1239 v0 := b.NewValue0(x.Pos, ssaop.OpPPC64MOVHBRload, typ.UInt16)1240 v.CopyOf(v0)1241 v1 := b.NewValue0(x.Pos, ssaop.OpPPC64MOVDaddr, ptr.Type)1242 v1.AuxInt = ssa.Int32ToAuxInt(off)1243 v1.Aux = ssa.SymToAux(sym)1244 v1.AddArg(ptr)1245 v0.AddArg2(v1, mem)1246 return true1247 }1248 // match: (Bswap16 x:(MOVHZloadidx ptr idx mem))1249 // result: @x.Block (MOVHBRloadidx ptr idx mem)1250 for {1251 x := v_01252 if x.Op != ssaop.OpPPC64MOVHZloadidx {1253 break1254 }1255 mem := x.Args[2]1256 ptr := x.Args[0]1257 idx := x.Args[1]1258 b = x.Block1259 v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHBRloadidx, typ.Int16)1260 v.CopyOf(v0)1261 v0.AddArg3(ptr, idx, mem)1262 return true1263 }1264 return false1265}1266func rewriteValue_OpBswap32(v *ssa.Value) bool {1267 v_0 := v.Args[0]1268 b := v.Block1269 typ := &b.Func.Config.Types1270 // match: (Bswap32 x)1271 // cond: buildcfg.GOPPC64>=101272 // result: (BRW x)1273 for {1274 x := v_01275 if !(buildcfg.GOPPC64 >= 10) {1276 break1277 }1278 v.Reset(ssaop.OpPPC64BRW)1279 v.AddArg(x)1280 return true1281 }1282 // match: (Bswap32 x:(MOVWZload [off] {sym} ptr mem))1283 // result: @x.Block (MOVWBRload (MOVDaddr <ptr.Type> [off] {sym} ptr) mem)1284 for {1285 x := v_01286 if x.Op != ssaop.OpPPC64MOVWZload {1287 break1288 }1289 off := ssa.AuxIntToInt32(x.AuxInt)1290 sym := ssa.AuxToSym(x.Aux)1291 mem := x.Args[1]1292 ptr := x.Args[0]1293 b = x.Block1294 v0 := b.NewValue0(x.Pos, ssaop.OpPPC64MOVWBRload, typ.UInt32)1295 v.CopyOf(v0)1296 v1 := b.NewValue0(x.Pos, ssaop.OpPPC64MOVDaddr, ptr.Type)1297 v1.AuxInt = ssa.Int32ToAuxInt(off)1298 v1.Aux = ssa.SymToAux(sym)1299 v1.AddArg(ptr)1300 v0.AddArg2(v1, mem)1301 return true1302 }1303 // match: (Bswap32 x:(MOVWZloadidx ptr idx mem))1304 // result: @x.Block (MOVWBRloadidx ptr idx mem)1305 for {1306 x := v_01307 if x.Op != ssaop.OpPPC64MOVWZloadidx {1308 break1309 }1310 mem := x.Args[2]1311 ptr := x.Args[0]1312 idx := x.Args[1]1313 b = x.Block1314 v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVWBRloadidx, typ.Int32)1315 v.CopyOf(v0)1316 v0.AddArg3(ptr, idx, mem)1317 return true1318 }1319 return false1320}1321func rewriteValue_OpBswap64(v *ssa.Value) bool {1322 v_0 := v.Args[0]1323 b := v.Block1324 typ := &b.Func.Config.Types1325 // match: (Bswap64 x)1326 // cond: buildcfg.GOPPC64>=101327 // result: (BRD x)1328 for {1329 x := v_01330 if !(buildcfg.GOPPC64 >= 10) {1331 break1332 }1333 v.Reset(ssaop.OpPPC64BRD)1334 v.AddArg(x)1335 return true1336 }1337 // match: (Bswap64 x:(MOVDload [off] {sym} ptr mem))1338 // result: @x.Block (MOVDBRload (MOVDaddr <ptr.Type> [off] {sym} ptr) mem)1339 for {1340 x := v_01341 if x.Op != ssaop.OpPPC64MOVDload {1342 break1343 }1344 off := ssa.AuxIntToInt32(x.AuxInt)1345 sym := ssa.AuxToSym(x.Aux)1346 mem := x.Args[1]1347 ptr := x.Args[0]1348 b = x.Block1349 v0 := b.NewValue0(x.Pos, ssaop.OpPPC64MOVDBRload, typ.UInt64)1350 v.CopyOf(v0)1351 v1 := b.NewValue0(x.Pos, ssaop.OpPPC64MOVDaddr, ptr.Type)1352 v1.AuxInt = ssa.Int32ToAuxInt(off)1353 v1.Aux = ssa.SymToAux(sym)1354 v1.AddArg(ptr)1355 v0.AddArg2(v1, mem)1356 return true1357 }1358 // match: (Bswap64 x:(MOVDloadidx ptr idx mem))1359 // result: @x.Block (MOVDBRloadidx ptr idx mem)1360 for {1361 x := v_01362 if x.Op != ssaop.OpPPC64MOVDloadidx {1363 break1364 }1365 mem := x.Args[2]1366 ptr := x.Args[0]1367 idx := x.Args[1]1368 b = x.Block1369 v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDBRloadidx, typ.Int64)1370 v.CopyOf(v0)1371 v0.AddArg3(ptr, idx, mem)1372 return true1373 }1374 return false1375}1376func rewriteValue_OpCom16(v *ssa.Value) bool {1377 v_0 := v.Args[0]1378 // match: (Com16 x)1379 // result: (NOR x x)1380 for {1381 x := v_01382 v.Reset(ssaop.OpPPC64NOR)1383 v.AddArg2(x, x)1384 return true1385 }1386}1387func rewriteValue_OpCom32(v *ssa.Value) bool {1388 v_0 := v.Args[0]1389 // match: (Com32 x)1390 // result: (NOR x x)1391 for {1392 x := v_01393 v.Reset(ssaop.OpPPC64NOR)1394 v.AddArg2(x, x)1395 return true1396 }1397}1398func rewriteValue_OpCom64(v *ssa.Value) bool {1399 v_0 := v.Args[0]1400 // match: (Com64 x)1401 // result: (NOR x x)1402 for {1403 x := v_01404 v.Reset(ssaop.OpPPC64NOR)1405 v.AddArg2(x, x)1406 return true1407 }1408}1409func rewriteValue_OpCom8(v *ssa.Value) bool {1410 v_0 := v.Args[0]1411 // match: (Com8 x)1412 // result: (NOR x x)1413 for {1414 x := v_01415 v.Reset(ssaop.OpPPC64NOR)1416 v.AddArg2(x, x)1417 return true1418 }1419}1420func rewriteValue_OpCondSelect(v *ssa.Value) bool {1421 v_2 := v.Args[2]1422 v_1 := v.Args[1]1423 v_0 := v.Args[0]1424 b := v.Block1425 typ := &b.Func.Config.Types1426 // match: (CondSelect x y (SETBC [a] cmp))1427 // result: (ISEL [a] x y cmp)1428 for {1429 x := v_01430 y := v_11431 if v_2.Op != ssaop.OpPPC64SETBC {1432 break1433 }1434 a := ssa.AuxIntToInt32(v_2.AuxInt)1435 cmp := v_2.Args[0]1436 v.Reset(ssaop.OpPPC64ISEL)1437 v.AuxInt = ssa.Int32ToAuxInt(a)1438 v.AddArg3(x, y, cmp)1439 return true1440 }1441 // match: (CondSelect x y (SETBCR [a] cmp))1442 // result: (ISEL [a+4] x y cmp)1443 for {1444 x := v_01445 y := v_11446 if v_2.Op != ssaop.OpPPC64SETBCR {1447 break1448 }1449 a := ssa.AuxIntToInt32(v_2.AuxInt)1450 cmp := v_2.Args[0]1451 v.Reset(ssaop.OpPPC64ISEL)1452 v.AuxInt = ssa.Int32ToAuxInt(a + 4)1453 v.AddArg3(x, y, cmp)1454 return true1455 }1456 // match: (CondSelect x y bool)1457 // cond: ssa.FlagArg(bool) == nil1458 // result: (ISEL [6] x y (CMPconst [0] (ANDconst [1] bool)))1459 for {1460 x := v_01461 y := v_11462 bool := v_21463 if !(ssa.FlagArg(bool) == nil) {1464 break1465 }1466 v.Reset(ssaop.OpPPC64ISEL)1467 v.AuxInt = ssa.Int32ToAuxInt(6)1468 v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)1469 v0.AuxInt = ssa.Int64ToAuxInt(0)1470 v1 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDconst, typ.Int)1471 v1.AuxInt = ssa.Int64ToAuxInt(1)1472 v1.AddArg(bool)1473 v0.AddArg(v1)1474 v.AddArg3(x, y, v0)1475 return true1476 }1477 return false1478}1479func rewriteValue_OpConst16(v *ssa.Value) bool {1480 // match: (Const16 [val])1481 // result: (MOVDconst [int64(val)])1482 for {1483 val := ssa.AuxIntToInt16(v.AuxInt)1484 v.Reset(ssaop.OpPPC64MOVDconst)1485 v.AuxInt = ssa.Int64ToAuxInt(int64(val))1486 return true1487 }1488}1489func rewriteValue_OpConst32(v *ssa.Value) bool {1490 // match: (Const32 [val])1491 // result: (MOVDconst [int64(val)])1492 for {1493 val := ssa.AuxIntToInt32(v.AuxInt)1494 v.Reset(ssaop.OpPPC64MOVDconst)1495 v.AuxInt = ssa.Int64ToAuxInt(int64(val))1496 return true1497 }1498}1499func rewriteValue_OpConst64(v *ssa.Value) bool {1500 // match: (Const64 [val])1501 // result: (MOVDconst [int64(val)])1502 for {1503 val := ssa.AuxIntToInt64(v.AuxInt)1504 v.Reset(ssaop.OpPPC64MOVDconst)1505 v.AuxInt = ssa.Int64ToAuxInt(int64(val))1506 return true1507 }1508}1509func rewriteValue_OpConst8(v *ssa.Value) bool {1510 // match: (Const8 [val])1511 // result: (MOVDconst [int64(val)])1512 for {1513 val := ssa.AuxIntToInt8(v.AuxInt)1514 v.Reset(ssaop.OpPPC64MOVDconst)1515 v.AuxInt = ssa.Int64ToAuxInt(int64(val))1516 return true1517 }1518}1519func rewriteValue_OpConstBool(v *ssa.Value) bool {1520 // match: (ConstBool [t])1521 // result: (MOVDconst [ssa.B2i(t)])1522 for {1523 t := ssa.AuxIntToBool(v.AuxInt)1524 v.Reset(ssaop.OpPPC64MOVDconst)1525 v.AuxInt = ssa.Int64ToAuxInt(ssa.B2i(t))1526 return true1527 }1528}1529func rewriteValue_OpConstNil(v *ssa.Value) bool {1530 // match: (ConstNil)1531 // result: (MOVDconst [0])1532 for {1533 v.Reset(ssaop.OpPPC64MOVDconst)1534 v.AuxInt = ssa.Int64ToAuxInt(0)1535 return true1536 }1537}1538func rewriteValue_OpCopysign(v *ssa.Value) bool {1539 v_1 := v.Args[1]1540 v_0 := v.Args[0]1541 // match: (Copysign x y)1542 // result: (FCPSGN y x)1543 for {1544 x := v_01545 y := v_11546 v.Reset(ssaop.OpPPC64FCPSGN)1547 v.AddArg2(y, x)1548 return true1549 }1550}1551func rewriteValue_OpCtz16(v *ssa.Value) bool {1552 v_0 := v.Args[0]1553 b := v.Block1554 typ := &b.Func.Config.Types1555 // match: (Ctz16 x)1556 // cond: buildcfg.GOPPC64 <= 81557 // result: (POPCNTW (MOVHZreg (ANDN <typ.Int16> (ADDconst <typ.Int16> [-1] x) x)))1558 for {1559 x := v_01560 if !(buildcfg.GOPPC64 <= 8) {1561 break1562 }1563 v.Reset(ssaop.OpPPC64POPCNTW)1564 v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHZreg, typ.Int64)1565 v1 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDN, typ.Int16)1566 v2 := b.NewValue0(v.Pos, ssaop.OpPPC64ADDconst, typ.Int16)1567 v2.AuxInt = ssa.Int64ToAuxInt(-1)1568 v2.AddArg(x)1569 v1.AddArg2(v2, x)1570 v0.AddArg(v1)1571 v.AddArg(v0)1572 return true1573 }1574 // match: (Ctz16 x)1575 // cond: buildcfg.GOPPC64 >= 91576 // result: (CNTTZD (OR <typ.UInt64> x (MOVDconst [1<<16])))1577 for {1578 x := v_01579 if !(buildcfg.GOPPC64 >= 9) {1580 break1581 }1582 v.Reset(ssaop.OpPPC64CNTTZD)1583 v0 := b.NewValue0(v.Pos, ssaop.OpPPC64OR, typ.UInt64)1584 v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)1585 v1.AuxInt = ssa.Int64ToAuxInt(1 << 16)1586 v0.AddArg2(x, v1)1587 v.AddArg(v0)1588 return true1589 }1590 return false1591}1592func rewriteValue_OpCtz32(v *ssa.Value) bool {1593 v_0 := v.Args[0]1594 b := v.Block1595 typ := &b.Func.Config.Types1596 // match: (Ctz32 x)1597 // cond: buildcfg.GOPPC64 <= 81598 // result: (POPCNTW (MOVWZreg (ANDN <typ.Int> (ADDconst <typ.Int> [-1] x) x)))1599 for {1600 x := v_01601 if !(buildcfg.GOPPC64 <= 8) {1602 break1603 }1604 v.Reset(ssaop.OpPPC64POPCNTW)1605 v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVWZreg, typ.Int64)1606 v1 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDN, typ.Int)1607 v2 := b.NewValue0(v.Pos, ssaop.OpPPC64ADDconst, typ.Int)1608 v2.AuxInt = ssa.Int64ToAuxInt(-1)1609 v2.AddArg(x)1610 v1.AddArg2(v2, x)1611 v0.AddArg(v1)1612 v.AddArg(v0)1613 return true1614 }1615 // match: (Ctz32 x)1616 // cond: buildcfg.GOPPC64 >= 91617 // result: (CNTTZW (MOVWZreg x))1618 for {1619 x := v_01620 if !(buildcfg.GOPPC64 >= 9) {1621 break1622 }1623 v.Reset(ssaop.OpPPC64CNTTZW)1624 v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVWZreg, typ.Int64)1625 v0.AddArg(x)1626 v.AddArg(v0)1627 return true1628 }1629 return false1630}1631func rewriteValue_OpCtz64(v *ssa.Value) bool {1632 v_0 := v.Args[0]1633 b := v.Block1634 typ := &b.Func.Config.Types1635 // match: (Ctz64 x)1636 // cond: buildcfg.GOPPC64 <= 81637 // result: (POPCNTD (ANDN <typ.Int64> (ADDconst <typ.Int64> [-1] x) x))1638 for {1639 x := v_01640 if !(buildcfg.GOPPC64 <= 8) {1641 break1642 }1643 v.Reset(ssaop.OpPPC64POPCNTD)1644 v0 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDN, typ.Int64)1645 v1 := b.NewValue0(v.Pos, ssaop.OpPPC64ADDconst, typ.Int64)1646 v1.AuxInt = ssa.Int64ToAuxInt(-1)1647 v1.AddArg(x)1648 v0.AddArg2(v1, x)1649 v.AddArg(v0)1650 return true1651 }1652 // match: (Ctz64 x)1653 // cond: buildcfg.GOPPC64 >= 91654 // result: (CNTTZD x)1655 for {1656 x := v_01657 if !(buildcfg.GOPPC64 >= 9) {1658 break1659 }1660 v.Reset(ssaop.OpPPC64CNTTZD)1661 v.AddArg(x)1662 return true1663 }1664 return false1665}1666func rewriteValue_OpCtz8(v *ssa.Value) bool {1667 v_0 := v.Args[0]1668 b := v.Block1669 typ := &b.Func.Config.Types1670 // match: (Ctz8 x)1671 // cond: buildcfg.GOPPC64 <= 81672 // result: (POPCNTB (MOVBZreg (ANDN <typ.UInt8> (ADDconst <typ.UInt8> [-1] x) x)))1673 for {1674 x := v_01675 if !(buildcfg.GOPPC64 <= 8) {1676 break1677 }1678 v.Reset(ssaop.OpPPC64POPCNTB)1679 v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBZreg, typ.Int64)1680 v1 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDN, typ.UInt8)1681 v2 := b.NewValue0(v.Pos, ssaop.OpPPC64ADDconst, typ.UInt8)1682 v2.AuxInt = ssa.Int64ToAuxInt(-1)1683 v2.AddArg(x)1684 v1.AddArg2(v2, x)1685 v0.AddArg(v1)1686 v.AddArg(v0)1687 return true1688 }1689 // match: (Ctz8 x)1690 // cond: buildcfg.GOPPC64 >= 91691 // result: (CNTTZD (OR <typ.UInt64> x (MOVDconst [1<<8])))1692 for {1693 x := v_01694 if !(buildcfg.GOPPC64 >= 9) {1695 break1696 }1697 v.Reset(ssaop.OpPPC64CNTTZD)1698 v0 := b.NewValue0(v.Pos, ssaop.OpPPC64OR, typ.UInt64)1699 v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)1700 v1.AuxInt = ssa.Int64ToAuxInt(1 << 8)1701 v0.AddArg2(x, v1)1702 v.AddArg(v0)1703 return true1704 }1705 return false1706}1707func rewriteValue_OpCvt32Fto32(v *ssa.Value) bool {1708 v_0 := v.Args[0]1709 b := v.Block1710 typ := &b.Func.Config.Types1711 // match: (Cvt32Fto32 x)1712 // result: (MFVSRD (FCTIWZ x))1713 for {1714 x := v_01715 v.Reset(ssaop.OpPPC64MFVSRD)1716 v0 := b.NewValue0(v.Pos, ssaop.OpPPC64FCTIWZ, typ.Float64)1717 v0.AddArg(x)1718 v.AddArg(v0)1719 return true1720 }1721}1722func rewriteValue_OpCvt32Fto64(v *ssa.Value) bool {1723 v_0 := v.Args[0]1724 b := v.Block1725 typ := &b.Func.Config.Types1726 // match: (Cvt32Fto64 x)1727 // result: (MFVSRD (FCTIDZ x))1728 for {1729 x := v_01730 v.Reset(ssaop.OpPPC64MFVSRD)1731 v0 := b.NewValue0(v.Pos, ssaop.OpPPC64FCTIDZ, typ.Float64)1732 v0.AddArg(x)1733 v.AddArg(v0)1734 return true1735 }1736}1737func rewriteValue_OpCvt32to32F(v *ssa.Value) bool {1738 v_0 := v.Args[0]1739 b := v.Block1740 typ := &b.Func.Config.Types1741 // match: (Cvt32to32F x)1742 // result: (FCFIDS (MTVSRD (SignExt32to64 x)))1743 for {1744 x := v_01745 v.Reset(ssaop.OpPPC64FCFIDS)1746 v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MTVSRD, typ.Float64)1747 v1 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)1748 v1.AddArg(x)1749 v0.AddArg(v1)1750 v.AddArg(v0)1751 return true1752 }1753}1754func rewriteValue_OpCvt32to64F(v *ssa.Value) bool {1755 v_0 := v.Args[0]1756 b := v.Block1757 typ := &b.Func.Config.Types1758 // match: (Cvt32to64F x)1759 // result: (FCFID (MTVSRD (SignExt32to64 x)))1760 for {1761 x := v_01762 v.Reset(ssaop.OpPPC64FCFID)1763 v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MTVSRD, typ.Float64)1764 v1 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)1765 v1.AddArg(x)1766 v0.AddArg(v1)1767 v.AddArg(v0)1768 return true1769 }1770}1771func rewriteValue_OpCvt64Fto32(v *ssa.Value) bool {1772 v_0 := v.Args[0]1773 b := v.Block1774 typ := &b.Func.Config.Types1775 // match: (Cvt64Fto32 x)1776 // result: (MFVSRD (FCTIWZ x))1777 for {1778 x := v_01779 v.Reset(ssaop.OpPPC64MFVSRD)1780 v0 := b.NewValue0(v.Pos, ssaop.OpPPC64FCTIWZ, typ.Float64)1781 v0.AddArg(x)1782 v.AddArg(v0)1783 return true1784 }1785}1786func rewriteValue_OpCvt64Fto64(v *ssa.Value) bool {1787 v_0 := v.Args[0]1788 b := v.Block1789 typ := &b.Func.Config.Types1790 // match: (Cvt64Fto64 x)1791 // result: (MFVSRD (FCTIDZ x))1792 for {1793 x := v_01794 v.Reset(ssaop.OpPPC64MFVSRD)1795 v0 := b.NewValue0(v.Pos, ssaop.OpPPC64FCTIDZ, typ.Float64)1796 v0.AddArg(x)1797 v.AddArg(v0)1798 return true1799 }1800}1801func rewriteValue_OpCvt64to32F(v *ssa.Value) bool {1802 v_0 := v.Args[0]1803 b := v.Block1804 typ := &b.Func.Config.Types1805 // match: (Cvt64to32F x)1806 // result: (FCFIDS (MTVSRD x))1807 for {1808 x := v_01809 v.Reset(ssaop.OpPPC64FCFIDS)1810 v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MTVSRD, typ.Float64)1811 v0.AddArg(x)1812 v.AddArg(v0)1813 return true1814 }1815}1816func rewriteValue_OpCvt64to64F(v *ssa.Value) bool {1817 v_0 := v.Args[0]1818 b := v.Block1819 typ := &b.Func.Config.Types1820 // match: (Cvt64to64F x)1821 // result: (FCFID (MTVSRD x))1822 for {1823 x := v_01824 v.Reset(ssaop.OpPPC64FCFID)1825 v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MTVSRD, typ.Float64)1826 v0.AddArg(x)1827 v.AddArg(v0)1828 return true1829 }1830}1831func rewriteValue_OpDiv16(v *ssa.Value) bool {1832 v_1 := v.Args[1]1833 v_0 := v.Args[0]1834 b := v.Block1835 typ := &b.Func.Config.Types1836 // match: (Div16 [false] x y)1837 // result: (DIVW (SignExt16to32 x) (SignExt16to32 y))1838 for {1839 if ssa.AuxIntToBool(v.AuxInt) != false {1840 break1841 }1842 x := v_01843 y := v_11844 v.Reset(ssaop.OpPPC64DIVW)1845 v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to32, typ.Int32)1846 v0.AddArg(x)1847 v1 := b.NewValue0(v.Pos, ssaop.OpSignExt16to32, typ.Int32)1848 v1.AddArg(y)1849 v.AddArg2(v0, v1)1850 return true1851 }1852 return false1853}1854func rewriteValue_OpDiv16u(v *ssa.Value) bool {1855 v_1 := v.Args[1]1856 v_0 := v.Args[0]1857 b := v.Block1858 typ := &b.Func.Config.Types1859 // match: (Div16u x y)1860 // result: (DIVWU (ZeroExt16to32 x) (ZeroExt16to32 y))1861 for {1862 x := v_01863 y := v_11864 v.Reset(ssaop.OpPPC64DIVWU)1865 v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)1866 v0.AddArg(x)1867 v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)1868 v1.AddArg(y)1869 v.AddArg2(v0, v1)1870 return true1871 }1872}1873func rewriteValue_OpDiv32(v *ssa.Value) bool {1874 v_1 := v.Args[1]1875 v_0 := v.Args[0]1876 // match: (Div32 [false] x y)1877 // result: (DIVW x y)1878 for {1879 if ssa.AuxIntToBool(v.AuxInt) != false {1880 break1881 }1882 x := v_01883 y := v_11884 v.Reset(ssaop.OpPPC64DIVW)1885 v.AddArg2(x, y)1886 return true1887 }1888 return false1889}1890func rewriteValue_OpDiv64(v *ssa.Value) bool {1891 v_1 := v.Args[1]1892 v_0 := v.Args[0]1893 // match: (Div64 [false] x y)1894 // result: (DIVD x y)1895 for {1896 if ssa.AuxIntToBool(v.AuxInt) != false {1897 break1898 }1899 x := v_01900 y := v_11901 v.Reset(ssaop.OpPPC64DIVD)1902 v.AddArg2(x, y)1903 return true1904 }1905 return false1906}1907func rewriteValue_OpDiv8(v *ssa.Value) bool {1908 v_1 := v.Args[1]1909 v_0 := v.Args[0]1910 b := v.Block1911 typ := &b.Func.Config.Types1912 // match: (Div8 x y)1913 // result: (DIVW (SignExt8to32 x) (SignExt8to32 y))1914 for {1915 x := v_01916 y := v_11917 v.Reset(ssaop.OpPPC64DIVW)1918 v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to32, typ.Int32)1919 v0.AddArg(x)1920 v1 := b.NewValue0(v.Pos, ssaop.OpSignExt8to32, typ.Int32)1921 v1.AddArg(y)1922 v.AddArg2(v0, v1)1923 return true1924 }1925}1926func rewriteValue_OpDiv8u(v *ssa.Value) bool {1927 v_1 := v.Args[1]1928 v_0 := v.Args[0]1929 b := v.Block1930 typ := &b.Func.Config.Types1931 // match: (Div8u x y)1932 // result: (DIVWU (ZeroExt8to32 x) (ZeroExt8to32 y))1933 for {1934 x := v_01935 y := v_11936 v.Reset(ssaop.OpPPC64DIVWU)1937 v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to32, typ.UInt32)1938 v0.AddArg(x)1939 v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to32, typ.UInt32)1940 v1.AddArg(y)1941 v.AddArg2(v0, v1)1942 return true1943 }1944}1945func rewriteValue_OpEq16(v *ssa.Value) bool {1946 v_1 := v.Args[1]1947 v_0 := v.Args[0]1948 b := v.Block1949 typ := &b.Func.Config.Types1950 // match: (Eq16 x y)1951 // cond: x.Type.IsSigned() && y.Type.IsSigned()1952 // result: (Equal (CMPW (SignExt16to32 x) (SignExt16to32 y)))1953 for {1954 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {1955 x := v_01956 y := v_11957 if !(x.Type.IsSigned() && y.Type.IsSigned()) {1958 continue1959 }1960 v.Reset(ssaop.OpPPC64Equal)1961 v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPW, types.TypeFlags)1962 v1 := b.NewValue0(v.Pos, ssaop.OpSignExt16to32, typ.Int32)1963 v1.AddArg(x)1964 v2 := b.NewValue0(v.Pos, ssaop.OpSignExt16to32, typ.Int32)1965 v2.AddArg(y)1966 v0.AddArg2(v1, v2)1967 v.AddArg(v0)1968 return true1969 }1970 break1971 }1972 // match: (Eq16 x y)1973 // result: (Equal (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))1974 for {1975 x := v_01976 y := v_11977 v.Reset(ssaop.OpPPC64Equal)1978 v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPW, types.TypeFlags)1979 v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)1980 v1.AddArg(x)1981 v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)1982 v2.AddArg(y)1983 v0.AddArg2(v1, v2)1984 v.AddArg(v0)1985 return true1986 }1987}1988func rewriteValue_OpEq32(v *ssa.Value) bool {1989 v_1 := v.Args[1]1990 v_0 := v.Args[0]1991 b := v.Block1992 // match: (Eq32 x y)1993 // result: (Equal (CMPW x y))1994 for {1995 x := v_01996 y := v_11997 v.Reset(ssaop.OpPPC64Equal)1998 v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPW, types.TypeFlags)1999 v0.AddArg2(x, y)2000 v.AddArg(v0)
Findings
✓ No findings reported for this file.