This is an archive of the discontinued LLVM Phabricator instance.

AVX-512: Fixed a crash during legalization of <3 x i8> type
ClosedPublic

Authored by delena on Jun 22 2017, 2:27 AM.

Details

Summary

The compiler fails with assertion during legalization of SETCC for <3 x i8> operands.
The result is extended to <4 x i8> and then truncated <4 x i1>. It does not happen on AVX2, because the final result of SETCC is <4 x i32>.

Diff Detail

Repository
rL LLVM

Event Timeline

delena created this revision.Jun 22 2017, 2:27 AM
RKSimon added a subscriber: RKSimon.
RKSimon added inline comments.
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
622

Merge into DAG.getSExtOrTrunc ?

test/CodeGen/X86/avx512-vec3-crash.ll
2

I don't see any reason why you shouldn't FileCheck this and generate the codegen with update_llc_test_checks.py

delena updated this revision to Diff 103864.Jun 25 2017, 5:14 AM

Code changes according to Simon's comments.

RKSimon accepted this revision.Jun 25 2017, 6:00 AM

LGTM, thanks

This revision is now accepted and ready to land.Jun 25 2017, 6:00 AM

Thanks, Simon!

delena closed this revision.Jun 25 2017, 8:01 AM