<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/139570>139570</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[HIP][AMDGPU] Assertion failure when AMD attribute value depends on template argument
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
jayfoad
</td>
</tr>
</table>
<pre>
With this [test case](https://github.com/user-attachments/files/20164855/f.txt) I get:
```
$ clang++ -nogpuinc -nogpulib -c -x hip f.txt
clang-21: lib/AST/ExprConstant.cpp:17150: APSInt clang::Expr::EvaluateKnownConstInt(const ASTContext &, SmallVectorImpl<PartialDiagnosticAt> *) const: Assertion `!isValueDependent() && "Expression evaluator can't be called on a dependent expression."' failed.
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx8UsGOo0YQ_ZriUjKCajfgAwc8rBMrWmmk2WzODZShV-0G0cWM9--jZp1kTpGQqkRXvXrv6ZkQ7OiZa9Bn0G1iNpnmtf5hft5mMyTdPPys_7IyoUw2IOizcBDsTWDQLVA1iSwBVAN0AbqMVqatS_v5DnTZAq8HI2L66c5eAtDlZh3HSlleHCut469UHgJ0wiuOLBEpa6DInl_WAB2xd8aPQGegMx78PC6b9f2zc7bDQ4-HB052wV9oWbNvHCgH1aCzHdClefsGdPnyWNaX2QcxXtJ-WUA1eZnrLM41r29XL89jqgHVxOln927cZoT_8POH3wGuXoCqPrbYvH17mb3wQxCoAHrBt7tx7jv3Mq_X--JAvbyaVaxxrTWjn4PYvhFQXxCoieJ3nJ1ECLyKnT1G-ZTb8N24jVte2A-834zz-5kCgShy5BDiBv8iOa_YGw9UCnaMvXGOB5w9Ghz-QUH-dysFIqASb8Y6HtLP7idDrYaTOpmE67w8llmhNalkqkt1KsvipHWVGdKq4o7z8lSZ4810dDMqsTVlpDOdU651dVRpqVSpTVYVqhu6ri_gmPHdWJc6935P53VMbAgb17k66TJLnOnYhT2TRJ4_cH-NTHWbrHVcOnTbGOCYORsk_AcjVtwe5t-vrzGh-tx8bX97_RN0-8nbKHZbGT8m9th8bdGIrLbbhDF6yE-nQrRN-L44I4xmHbcY5GRbXf0_uY9cnuWwrPMP7gXosiuI2X9KfK_p7wAAAP___RsZWg">