-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Signed loads should not zero-def their destination. #26593
Signed loads should not zero-def their destination. #26593
Conversation
EWS run on current version of this PR (hash f74efe4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me
Failed api-wpe checks. Please resolve failures and re-apply Rejecting #26593 from merge queue. |
Safe-Merge-Queue: Build #16324. |
The |
https://bugs.webkit.org/show_bug.cgi?id=271866 rdar://122959696 Reviewed by Yusuke Suzuki. This fixes a hang in Google Meet when applying the Black Noir filter. Suppose we have: ``` @A = Load8SignedExtendTo32(@x) @b = Trunc(ZExt32(@A)) ``` B3 reduceStrength will convert @b to @A. The Air register allocator will see that we ZDef 64 bits in @A, but on ARM64, we actually sign-extend them. This was caught by changing reduceStrength: ``` case Trunc: // Turn this: Trunc(SExt32(value)) or Trunc(ZExt32(value)) // Into this: value if (m_value->child(0)->opcode() == SExt32 || m_value->child(0)->opcode() == ZExt32) { auto* value = m_value->child(0)->child(0); auto* patchpoint = m_insertionSet.insert<PatchpointValue>( m_index, m_value->type(), m_value->origin()); patchpoint->effects = Effects(); patchpoint->effects.reads = HeapRange::top(); patchpoint->effects.exitsSideways = true; patchpoint->append(value); patchpoint->setGenerator([&] (CCallHelpers& jit, const StackmapGenerationParams& params) { RELEASE_ASSERT(params.size() == 2); RELEASE_ASSERT(params[0].isGPR()); RELEASE_ASSERT(params[1].isGPR()); auto dst = params[0].gpr(); auto a = params[1].gpr(); auto branch = jit.branchTest64(CCallHelpers::Zero, a, MacroAssembler::TrustedImm64(0xFFFFFFFF00000000)); jit.breakpoint(); jit.breakpoint(0); jit.breakpoint(1); jit.breakpoint(2); branch.link(&jit); jit.move(a, dst); }); replaceWithNew<Value>(Identity, m_value->origin(), patchpoint); ``` * Source/JavaScriptCore/b3/air/AirOpcode.opcodes: Canonical link: https://commits.webkit.org/276829@main
f74efe4
to
5838997
Compare
Committed 276829@main (5838997): https://commits.webkit.org/276829@main Reviewed commits have been landed. Closing PR #26593 and removing active labels. |
5838997
f74efe4