This is an archive of the discontinued LLVM Phabricator instance.

[NFC] Refactor the code to avoid check target type.
Needs ReviewPublic

Authored by LuoYuanke on Mar 13 2021, 7:30 PM.

Diff Detail

Event Timeline

LuoYuanke created this revision.Mar 13 2021, 7:30 PM
LuoYuanke requested review of this revision.Mar 13 2021, 7:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 13 2021, 7:30 PM
LuoYuanke updated this revision to Diff 330491.Mar 13 2021, 7:33 PM

Fix the comments.

lebedev.ri resigned from this revision.Mar 14 2021, 4:45 AM

IMHO being explicit about the ugliness of the hack (LHS of the diff) is better than inventing a confusing misnomer (how is bitcast between pointers with same address space not lossless?) and hiding behind it.

Is this really NFC? If it is, then as @lebedev.ri commented - it feels like you're hiding an AMX issue. If it isn't NFC we need more test coverage.

Is this really NFC? If it is, then as @lebedev.ri commented - it feels like you're hiding an AMX issue. If it isn't NFC we need more test coverage.

I think it should be NFC. The test case is already at test/Transforms/InstCombine/X86/x86-amx-load-store.ll.

I'll look into this further to see if there is a better solution.