Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / msp430-reloc.c
blobf3d858839ec7cfee1d82613bcae1d4c166bf27ee
1 // REQUIRES: msp430-registered-target
2 // RUN: %clang -target msp430 -fPIC -S %s -o - | FileCheck %s
4 // Check the compilation does not crash as it was crashing before with "-fPIC" enabled
6 void *alloca(unsigned int size);
8 // CHECK: .globl foo
9 short foo(char** data, char encoding)
11 char* encoding_addr = alloca(sizeof(char));
12 *encoding_addr = encoding;
14 char tmp3 = *encoding_addr;
15 short conv2 = tmp3;
16 short and = conv2 & 0xf;
18 switch (and)
20 case 0 :
21 case 4 :
22 case 10 :
23 return 1;
24 case 11 :
25 return 2;
28 return 0;