[all-commits] [llvm/llvm-project] 0dad68: [SPIRV] In G_SELECT selection path: replace `remov...
Juan Manuel Martinez Caamaño via All-commits
all-commits at lists.llvm.org
Mon Mar 9 01:14:45 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0dad68438dc68b9c97b220c1f1647ccdbc6ffff5
https://github.com/llvm/llvm-project/commit/0dad68438dc68b9c97b220c1f1647ccdbc6ffff5
Author: Juan Manuel Martinez Caamaño <jmartinezcaamao at gmail.com>
Date: 2026-03-09 (Mon, 09 Mar 2026)
Changed paths:
M llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
Log Message:
-----------
[SPIRV] In G_SELECT selection path: replace `removeFromParent` with `eraseFromParent` and return early (#184807)
When selecting an `ASSIGN_TYPE` of a `G_SELECT`, both instructions were
removed but not erased.
The code followed on a code path where the replaced G_SELECT would be
added to a remove set if it was dead. But the select is not in the
function anymore since it is already removed!
Selecting a `selectSelect` always returns `true`. So the
assertions/prints below would have never been triggered.
This patch simplifies this code path to avoid falling through the
asserts and paths where `selectSelect` could have failed (which
trivially doesn't happen).
Guarded `selectSelect` return with an assert in case it changes.
Follow up of https://github.com/llvm/llvm-project/pull/182330
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list