Skip to content

Conversation

@llvmbot
Copy link
Member

@llvmbot llvmbot commented Aug 14, 2022

…lems

The problem Alexander reported on D127982 was caused by an optimization
for AVX512-FP16 instruction. We must limit it to the feature enabled only.

During the investigation, I found we didn't expand for fp_round/fp_extend
without F16C. This may result runtime crash, so change them too.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D130817

(cherry picked from commit 23021d4)
This is to avoid f16->i64 being lowered to `__fixhfdi/__fixunshfdi` on 32-bits since neither libgcc nor compiler-rt provide them. https://godbolt.org/z/cjWEsea5v

It also helps to improve the performance by promoting the vector type.

Reviewed By: LuoYuanke

Differential Revision: https://reviews.llvm.org/D131828

(cherry picked from commit 8b69549)
@llvmbot
Copy link
Member Author

llvmbot commented Aug 14, 2022

@RKSimon @LuoYuanke What do you think about merging this PR to the release branch?

@LuoYuanke
Copy link
Contributor

The patch fixed the lowering bugs on fp16. It focus on X86 fp16 lowering, so the risk is low. I would suggest merging them to release branch because it improve the quality of x86 fp16 support and in low risk to introduce problems.

@tru tru merged commit accc7a1 into release/15.x Aug 15, 2022
@tru tru deleted the llvm-issue57141 branch August 15, 2022 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Backport D130817 and D131828 to LLVM15

5 participants