summaryrefslogtreecommitdiffstats
path: root/test/CodeGen
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-03-24 16:50:34 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-03-24 16:50:34 +0000
commitc3f8955d7da1019dbe16b0bdf3e49d2e08d988e9 (patch)
treee1959286beb3f72055c8f713bb2804f07b9a4f62 /test/CodeGen
parent88a569a9781e0472a1f1c392f6c94ed0c068d946 (diff)
Add back r153360 with a fix for enums that cover all the 32 bit values.
Thanks to NAKAMURA Takumi for finding it! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153383 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/pr12251.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/pr12251.c b/test/CodeGen/pr12251.c
new file mode 100644
index 0000000000..a644bb79da
--- /dev/null
+++ b/test/CodeGen/pr12251.c
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 %s -emit-llvm -O1 -relaxed-aliasing -o - | FileCheck %s
+
+enum e1 {e1_a = -1 };
+enum e1 g1(enum e1 *x) {
+ return *x;
+}
+
+// CHECK: define i32 @g1
+// CHECK: load i32* %x, align 4
+// CHECK-NOT: range
+// CHECK: ret