<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=http://email.email.llvm.org/c/eJylVttu4zYQ_Rr5hYghkro--CFxkt0ACRIkwQLti0FRI1stRboU5az79R1R8m3jFjEqCBbNyzlnZjhDFqbczgIWESkccdC6aROEt0F4HSTh-A5_Ga-btbGOBHzeulI409Ryugr43TCh1o7cvcJfHWLMTaf7ibckDPjNHqCEqtZA3o0TitBwh-x_F9ceMGAZAnG2cAHLyUL2QG0Q3_g1QXy7h9uYuiSVMbignxmkYz8hpekKBcT1K0Y9rddyQDvReYwapLfnrR9NQDcpoZejo8iVJIRcLcnVc4hfYeWKCNskETlZdQr15oT8k5RdsyYftVuZzpF22xRGES0aQKUsA912FsjWdGQlNkCU2jRXw6T6b7Ck1v2YJS_X79-JsaQFDN0KCOhNbY1uAJ2_EZYg5-Pjj6fF229PN8-PD7_fvS76JdiN3iFr04cMG3Xv64CPctESVRf9urdu3Qd8Wm6xgwxP-DMcHkoTkckwTr26fjW_brft0HixCO0NfbdCApp0mGTFx8K0zoJoApYEbI7m-GAH7IbwfBBBLxBRUBafE_Ha6bd6qYX6LnSpwLa7rYI8WTzwsEt40jI8xzNXIHS3fh7ZkKXTLTahJMro5Y6ShdnAyb_MmReclqLfEUIbvW1M1w6bZO2dmo_8VrSrV5BmA3Y7N9rBT_fQrNUwOhjv5wy51Xv8rEAaJoPA6BKBXGbkRMGJz3eUIwMfGWLPgB500CzWSrjK2GbPMjCkVZWFcZWGwEqyQL3OCswZ78pxlyRfgskzXuZJju1fYGgWRUka8SRhnMVZTuNkDFF6DCxPzP9FH4i0pCERha-MPSjjA0Z2CUZYYPZa6xHGOpHvo_BNmUKohzdQB5SjKGS8KgCO8_BJyBUW2ldY1shuH3RlhoElOOycK9G2Jzm5m9kHShrdjqbEdMzG8OtS0BZ-JOUBwWwnXW00LgLpxiLQ6Wc9yrzvtB8_UfRpLNmXCBqPyUvpTtbclPAN9L_t04gXqYyqzx7awb_0DjkIO6vonJQkHZWwgxIL52PtleSxBJ4eK7l_6cmfhBZL9P_lGvAY3YngXxZRRpGgXxDxZMpOnZbvXddeQLKLRnSBDwQ9LqUKlkJux6PjIORQxFDMf4ugNIzOnrmTcobZz3MxER0etna2qq0oa7cVk86q2cq5tY88u8d3iedxV0ylwZPp3rMNn6u1NX_0e5fd122LFwdsxJzxdLKa0YQllIc5TSgwgCLPK86hSCMpRJlIOlGiANXO8NYRMKbhg3gIbOO9Y_L_FdQzFjKGbk37T8ymMVRRJnkcsYhVJR50UQiNqNW0x5kau5zYmYcsumWLgwozvz0Movv7owG8YFToaqdg5it8f-8IWPo5pdmlxWfijZh5C_4Blj8juQ>53237</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Crash in 'InstructionSelect' llvm::MachineRegisterInfo::getRegClass
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
hiraditya
</td>
</tr>
</table>
<pre>
$ cat test.m
```
#import <stdatomic.h>
int ERequestCount = 0;
#define Total 100
_Atomic(int32_t) _counts[Total];
void foo() {
double totalRequests = _counts[ERequestCount];
}
```
$ clang test.m -c -g -O0 -arch arm64
```
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 libLLVMSupport.dylib 0x0000000116a8c057 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 39
1 libLLVMSupport.dylib 0x0000000116a8b125 llvm::sys::RunSignalHandlers() + 85
2 libLLVMSupport.dylib 0x0000000116a8b7d0 llvm::sys::CleanupOnSignal(unsigned long) + 208
3 libLLVMSupport.dylib 0x00000001169b31da (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) + 106
4 libLLVMSupport.dylib 0x00000001169b33c8 CrashRecoverySignalHandler(int) + 136
5 libsystem_platform.dylib 0x00007ff805f70e2d _sigtramp + 29
6 libsystem_platform.dylib 0x00007f983d969000 _sigtramp + 18446743662325891568
7 libsystem_c.dylib 0x00007ff805ea7d10 abort + 123
8 libsystem_c.dylib 0x00007ff805ea70be err + 0
9 libLLVMGlobalISel.dylib 0x00000001183fbee7 llvm::MachineRegisterInfo::getRegClass(llvm::Register) const + 151
10 libLLVMGlobalISel.dylib 0x00000001183fa703 llvm::InstructionSelect::runOnMachineFunction(llvm::MachineFunction&) + 3155
11 libLLVMCodeGen.dylib 0x00000001143b7c4f llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 367
12 libLLVMCore.dylib 0x00000001195ce37f llvm::FPPassManager::runOnFunction(llvm::Function&) + 1007
13 libLLVMCore.dylib 0x00000001195d44a1 llvm::FPPassManager::runOnModule(llvm::Module&) + 65
14 libLLVMCore.dylib 0x00000001195cea10 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 1104
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVlslu4zgQhp9GvhAxKFLrwYfESboDJEiQBAPMXAxKKtnqoUgPSTntefopUfLW8TRiw7BoLv__VXFToavtLGARKYUjDqybtgG9Deh1kNDxO_xlvGnX2jgS8Ll1lXC6bcrpKuB3Q4dGOXL3Cv90qDHXneo73hIa8Ju9QAV1o4C8ayckCelO2f8urr1gwDIU4mzhApaTRdkL2SC-8WOC-HYvt9FNRWqtcUDfM0jHekIq3RUSiOtHjDzWsxzUTjiPVYP09nz0YwiYJinUckwUuSoJIVdLcvVM8SlMuSLCtElETkadSr05Uf5Nqq5dk4_GrXTniN22hZZEiRaQlGWgbGeAbHVHVmIDRMpNezV0av4FQxrVtxnycv3-nWhDLODUrYCA2jRGqxYw-RthCHo-Pv7xtHj78-nm-fHhr7vXRT8EqzE7ZK37KcNC0-c64CMuRiKboh_31q37CZ9WW6wgw4f-pMMnDBORlTROPV0_ml_brR0KLwalfaDvRpSAIR06GfGx0NYZEG3AkoDNMRw_2QG7ITwfIMILIIqQxecgXjv11iyVkN-FqiQYu1sq6JPFgw-7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