Skip to content

Commit 67d280d

Browse files
CRobeckjrmadsen
andauthored
Update llvm/lib/Transforms/UncoalescedAnalysis/UncoalescedAnalysis.cpp
Co-authored-by: Jonathan R. Madsen <[email protected]>
1 parent 7056885 commit 67d280d

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

llvm/lib/Transforms/UncoalescedAnalysis/UncoalescedAnalysis.cpp

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -137,17 +137,8 @@ GPUState UncoalescedAnalysis::ExecuteInstruction(
137137
if (!name.compare("__HIP_Coordinates<__HIP_ThreadIdx>::__X::operator unsigned int() const")) {
138138
st.setValue(CI, MultiplierValue(ONE));
139139
} else if (
140-
!name.compare("__HIP_Coordinates<__HIP_ThreadIdx>::__Y::operator unsigned int() const") ||
141-
!name.compare("__HIP_Coordinates<__HIP_ThreadIdx>::__Z::operator unsigned int() const") ||
142-
!name.compare("__HIP_Coordinates<__HIP_BlockDim>::__X::operator unsigned int() const") ||
143-
!name.compare("__HIP_Coordinates<__HIP_BlockDim>::__Z::operator unsigned int() const") ||
144-
!name.compare("__HIP_Coordinates<__HIP_BlockDim>::__Y::operator unsigned int() const") ||
145-
!name.compare("__HIP_Coordinates<__HIP_BlockIdx>::__X::operator unsigned int() const") ||
146-
!name.compare("__HIP_Coordinates<__HIP_BlockIdx>::__Y::operator unsigned int() const") ||
147-
!name.compare("__HIP_Coordinates<__HIP_BlockIdx>::__Z::operator unsigned int() const") ||
148-
!name.compare("__HIP_Coordinates<__HIP_GridDim>::__X::operator unsigned int() const") ||
149-
!name.compare("__HIP_Coordinates<__HIP_GridDim>::__Y::operator unsigned int() const") ||
150-
!name.compare("__HIP_Coordinates<__HIP_GridDim>::__Z::operator unsigned int() const")
140+
std::regex_match(name, std::regex{ "__HIP_Coordinates<__HIP_ThreadIdx>::__(Y|Z)::operator unsigned int\(\) const" } ||
141+
std::regex_match(name, std::regex{ "__HIP_Coordinates<__HIP_(BlockDim|BlockIdx|GridDim)>::__(X|Y|Z)::operator unsigned int\(\) const" })
151142
) {
152143

153144
st.setValue(CI, MultiplierValue(ZERO));

0 commit comments

Comments
 (0)