Skip to content

Commit 1711bb3

Browse files
committed
[X86] canCreateUndefOrPoisonForTargetNode - add SSE bit logic + VPTERNLOG handling
Basic bitlogic operations don't create undef/poison. Its proving really annoying to create proper test coverage for these specific opcodes as they tend to appear in later stages - their presence does help in some upcoming patches (e.g. llvm#152107) and I'd prefer to get them committed early.
1 parent ab5d749 commit 1711bb3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45150,6 +45150,14 @@ bool X86TargetLowering::canCreateUndefOrPoisonForTargetNode(
4515045150
bool PoisonOnly, bool ConsiderFlags, unsigned Depth) const {
4515145151

4515245152
switch (Op.getOpcode()) {
45153+
// SSE bit logic.
45154+
case X86ISD::FAND:
45155+
case X86ISD::FOR:
45156+
case X86ISD::FXOR:
45157+
case X86ISD::FANDN:
45158+
case X86ISD::ANDNP:
45159+
case X86ISD::VPTERNLOG:
45160+
return false;
4515345161
// SSE vector insert/extracts use modulo indices.
4515445162
case X86ISD::PINSRB:
4515545163
case X86ISD::PINSRW:

0 commit comments

Comments
 (0)