This is an archive of the discontinued LLVM Phabricator instance.

AVX-512: Generate KTEST instead of TEST
ClosedPublic

Authored by delena on Mar 24 2016, 5:53 AM.

Details

Summary

KTEST instruction may be used instead of TEST in this case:

%int_sel3 = bitcast <8 x i1> %sel3 to i8

%res = icmp eq i8 %int_sel3, zeroinitializer
br i1 %res, label %L2, label %L1

Diff Detail

Repository
rL LLVM

Event Timeline

delena updated this revision to Diff 51544.Mar 24 2016, 5:53 AM
delena retitled this revision from to AVX-512: Generate KTEST instead of TEST.
delena updated this object.
delena added a reviewer: igorb.
delena set the repository for this revision to rL LLVM.
delena added a subscriber: llvm-commits.
igorb accepted this revision.Mar 24 2016, 6:15 AM
igorb edited edge metadata.

please check the comment

LGTM

../lib/Target/X86/X86ISelLowering.cpp
14528 ↗(On Diff #51544)

i think you mean SizeInBits == 8 || SizeInBits == 16

This revision is now accepted and ready to land.Mar 24 2016, 6:15 AM
This revision was automatically updated to reflect the committed changes.