llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.43k stars 12.16k forks source link

Merge "[Codegen][X86] Fix /HOTPATCH with clang-cl and inline asm" into 18.x #88386

Closed aganea closed 7 months ago

aganea commented 7 months ago

Please merge the following patch:

[Codegen][X86] Fix /HOTPATCH with clang-cl and inline asm (https://github.com/llvm/llvm-project/pull/87639) This fixes an edge case where functions starting with inline assembly would assert while trying to lower that inline asm instruction.

After this PR, for now we always add a no-op (xchgw in this case) without considering the size of the next inline asm instruction. We might want to revisit this in the future.

This fixes Unreal Engine 5.3.2 compilation with clang-cl and /HOTPATCH.

Should close https://github.com/llvm/llvm-project/issues/56234

/cherry-pick ec1af63dde58c735fe60d6f2aafdb10fa93f410d

llvmbot commented 7 months ago

/pull-request llvm/llvm-project#88388

llvmbot commented 7 months ago

@llvm/issue-subscribers-backend-x86

Author: Alexandre Ganea (aganea)

Please merge the following patch: > [Codegen][X86] Fix /HOTPATCH with clang-cl and inline asm (https://github.com/llvm/llvm-project/pull/87639) > This fixes an edge case where functions starting with inline assembly > would assert while trying to lower that inline asm instruction. > > After this PR, for now we always add a no-op (xchgw in this case) without > considering the size of the next inline asm instruction. We might want > to revisit this in the future. > > This fixes Unreal Engine 5.3.2 compilation with clang-cl and /HOTPATCH. > > Should close https://github.com/llvm/llvm-project/issues/56234 > /cherry-pick ec1af63dde58c735fe60d6f2aafdb10fa93f410d