[llvm] [InstCombine] Fold icmp(constants[x]) when the range of x is given (PR #67093)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 2 06:38:54 PST 2024


================
@@ -334,3 +327,143 @@ define i1 @test10_struct_arr_noinbounds_i64(i64 %x) {
   %r = icmp eq i32 %q, 9
   ret i1 %r
 }
+
+
+ at CG = constant [4 x i32] [i32 1, i32 2, i32 3, i32 4]
+
+; TODO: Fold it globally.
----------------
nikic wrote:

Drop TODO?

https://github.com/llvm/llvm-project/pull/67093


More information about the llvm-commits mailing list