Files
TheRock/compiler/amd-llvm/clang/test/CodeGen/2008-03-24-BitField-And-Alloca.c
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

90 lines
1.6 KiB
C

// RUN: %clang_cc1 -O2 -emit-llvm %s -o - | not grep alloca
// RUN: %clang_cc1 -triple i686-pc-linux-gnu -O2 -emit-llvm %s -o - | not grep store
enum {
PP_C,
PP_D,
PP_R,
PP_2D,
PP_1D,
PP_SR,
PP_S2D,
PP_S1D,
PP_SC
};
enum {
G_VP,
G_FP,
G_VS,
G_GS,
G_FS
};
enum {
G_NONE,
G_B,
G_R
};
typedef union _Key {
struct {
unsigned int count : 2;
unsigned int Aconst : 1;
unsigned int Bconst : 1;
unsigned int Cconst : 1;
unsigned int Xused : 1;
unsigned int Yused : 1;
unsigned int Zused : 1;
unsigned int Wused : 1;
unsigned int ttype : 3;
unsigned int scalar : 1;
unsigned int AType : 4;
unsigned int BType : 4;
unsigned int CType : 4;
unsigned int RType : 4;
unsigned int Size : 2;
unsigned int prec : 1;
unsigned int ASize : 2;
unsigned int BSize : 2;
unsigned int CSize : 2;
unsigned int tTex : 4;
unsigned int proj : 1;
unsigned int lod : 2;
unsigned int dvts : 1;
unsigned int uipad : 18;
} key_io;
struct {
unsigned int key0;
unsigned int key1;
} key;
unsigned long long lkey;
} Key;
static void foo(const Key iospec, int* ret)
{
*ret=0;
if(((iospec.key_io.lod == G_B) &&
(iospec.key_io.ttype != G_VS) &&
(iospec.key_io.ttype != G_GS) &&
(iospec.key_io.ttype != G_FS)) ||
(((iospec.key_io.tTex == PP_C) ||
(iospec.key_io.tTex == PP_SC)) &&
((iospec.key_io.tTex == PP_SR) ||
(iospec.key_io.tTex == PP_S2D) ||
(iospec.key_io.tTex == PP_S1D) ||
(iospec.key_io.tTex == PP_SC))))
*ret=1;
}
extern int bar(unsigned long long key_token2)
{
int ret;
__attribute__ ((unused)) Key iospec = (Key) key_token2;
foo(iospec, &ret);
return ret;
}