/llvm-project/clang/test/Analysis/ |
H A D | svalbuilder-rearrange-comparisons.cpp | 2 // RUN: -analyzer-checker=debug.ExprInspection,core.builtin \ 3 // RUN: -analyzer-config aggressive-binary-operation-simplification=true \ 4 // RUN: -analyzer-config support-symbolic-integer-casts=false \ 5 // RUN: -analyzer-config eagerly-assume=false \ 6 // RUN: -verify %s 9 // RUN: -analyzer-checker=debug.ExprInspection,core.builtin \ 10 // RUN: -analyzer-config aggressive-binary-operation-simplification=true \ 11 // RUN: -analyzer-config support-symbolic-integer-casts=true \ 12 // RUN: -DSUPPORT_SYMBOLIC_INTEGER_CASTS \ 13 // RUN: -analyzer-config eagerly-assume=false \ [all …]
|
H A D | constraint_manager_conditions.cpp | 1 // RUN: %clang_analyze_cc1 -analyzer-checker=debug.ExprInspection -verify %s 5 void comparison_lt(int x, int y) { in comparison_lt() argument 6 if (x < y) { in comparison_lt() 7 clang_analyzer_eval(x < y); // expected-warning{{TRUE}} in comparison_lt() 8 clang_analyzer_eval(y > x); // expected-warning{{TRUE}} in comparison_lt() 9 clang_analyzer_eval(x > y); // expected-warning{{FALSE}} in comparison_lt() 10 clang_analyzer_eval(y < x); // expected-warning{{FALSE}} in comparison_lt() 11 clang_analyzer_eval(x <= y); // expected-warning{{TRUE}} in comparison_lt() 12 clang_analyzer_eval(y >= x); // expected-warning{{TRUE}} in comparison_lt() 13 clang_analyzer_eval(x >= y); // expected-warning{{FALSE}} in comparison_lt() [all …]
|
H A D | hangs.c | 1 // RUN: %clang_analyze_cc1 -verify %s \ 2 // RUN: -analyzer-checker core,debug.ExprInspection 16 int f(int y) { in f() argument 17 return y + g(); in f() 25 void produce_an_exponentially_exploding_symbol(int x, int y) { in produce_an_exponentially_exploding_symbol() argument 26 x += y; y += x + g(); in produce_an_exponentially_exploding_symbol() 27 x += y; y += x + g(); in produce_an_exponentially_exploding_symbol() 28 x += y; y += x + g(); in produce_an_exponentially_exploding_symbol() 29 x += y; y += x + g(); in produce_an_exponentially_exploding_symbol() 30 x += y; y += x + g(); in produce_an_exponentially_exploding_symbol() [all …]
|
H A D | bool-assignment.c | 1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.core.BoolAssignment,optin.taint -verify -std=c99 -Dbool=_Bool %s 2 // RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.core.BoolAssignment,optin.taint -verify -x c++ %s 9 void test_stdbool_initialization(int y) { in test_stdbool_initialization() argument 22 test_stdbool_assignment(int y) test_stdbool_assignment() argument 39 test_BOOL_initialization(int y) test_BOOL_initialization() argument 64 test_BOOL_assignment(int y) test_BOOL_assignment() argument 82 test_Boolean_initialization(int y) test_Boolean_initialization() argument 95 test_Boolean_assignment(int y) test_Boolean_assignment() argument [all...] |
/llvm-project/llvm/test/Transforms/InstSimplify/ |
H A D | reassociate.ll | 2 ; RUN: opt < %s -passes=instsimplify -S | FileCheck %s 5 ; CHECK-LABEL: @add1( 6 ; CHECK-NEXT: ret i32 [[X:%.*]] 8 ; (X + -1) + 1 -> X 9 %l = add i32 %x, -1 14 define i32 @and1(i32 %x, i32 %y) { 15 ; CHECK-LABEL: @and1( 16 ; CHECK-NEXT: [[L:%.*]] = and i32 [[X:%.*]], [[Y:%.*]] 17 ; CHECK-NEXT: ret i32 [[L]] 19 ; (X & Y) & X -> X & Y [all …]
|
H A D | and.ll | 2 ; RUN: opt < %s -passes=instsimplify -S | FileCheck %s 5 ; CHECK-LABEL: @poison( 6 ; CHECK-NEXT: ret i32 poison 12 ; (X | Y) & (X | ~Y) --> X (commuted 8 ways) 14 define i8 @or_or_not_commute0(i8 %x, i8 %y) { 15 ; CHECK-LABEL: @or_or_not_commute0( 16 ; CHECK-NEXT: ret i8 [[X:%.*]] 18 %ynot = xor i8 %y, -1 19 %xory = or i8 %x, %y 25 define <2 x i5> @or_or_not_commute1(<2 x i5> %x, <2 x i5> %y) { [all …]
|
H A D | select-maxmin.ll | 2 ; RUN: opt < %s -passes=instsimplify -S | FileCheck %s 15 define i8 @slt_xy_smin_fval(i8 %x, i8 %y) { 16 ; CHECK-LABEL: @slt_xy_smin_fval( 17 ; CHECK-NEXT: [[M:%.*]] = call i8 @llvm.smin.i8(i8 [[X:%.*]], i8 [[Y:%.*]]) 18 ; CHECK-NEXT: ret i8 [[M]] 20 %i = icmp slt i8 %x, %y 21 %m = call i8 @llvm.smin.i8(i8 %x, i8 %y) 26 define i8 @sle_xy_smin_fval(i8 %x, i8 %y) { 27 ; CHECK-LABEL: @sle_xy_smin_fval( 28 ; CHECK-NEXT: [[M:%.*]] = call i8 @llvm.smin.i8(i8 [[Y:%.*]], i8 [[X:%.*]]) [all …]
|
H A D | select-logical.ll | 2 ; RUN: opt < %s -passes=instsimplify -S | FileCheck %s 4 define i1 @logical_and_of_or_commute0(i1 %x, i1 %y) { 5 ; CHECK-LABEL: @logical_and_of_or_commute0( 6 ; CHECK-NEXT: ret i1 [[X:%.*]] 8 %ynot = xor i1 %y, -1 9 %xory = select i1 %x, i1 true, i1 %y 15 define <2 x i1> @logical_and_of_or_commute1(<2 x i1> %x, <2 x i1> %y) { 16 ; CHECK-LABE [all...] |
H A D | select_or_and.ll | 2 ; RUN: opt -S -passes=instsimplify < %s | FileCheck %s 4 ; select(Y | X == 0, X, Y | X) 5 define i32 @select_or_1(i32 %x, i32 %y) { 6 ; CHECK-LABEL: @select_or_1( 7 ; CHECK-NEXT: [[OR:%.*]] = or i32 [[Y:%.*]], [[X:%.*]] 8 ; CHECK-NEXT: ret i32 [[OR]] 10 %or = or i32 %y, [all...] |
H A D | maxmin.ll | 2 ; RUN: opt < %s -passes=instsimplify -S | FileCheck %s 5 ; CHECK-LABEL: @smax_min_limit( 6 ; CHECK-NEXT: ret i8 [[X:%.*]] 8 %cmp = icmp sgt i8 %x, -128 9 %sel = select i1 %cmp, i8 %x, i8 -128 14 ; CHECK-LABEL: @smin_max_limit( 15 ; CHECK-NEXT: ret i8 [[X:%.*]] 23 ; CHECK-LABEL: @umax_min_limit( 24 ; CHECK-NEXT: ret <2 x i8> [[X:%.*]] 32 ; CHECK-LABEL: @umin_max_limit( [all …]
|
/llvm-project/mlir/unittests/Analysis/Presburger/ |
H A D | PWMAFunctionTest.cpp | 1 //===- PWMAFunctionTest.cpp - Tests for PWMAFunction ----------------------===// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 11 //===----------------------------------------------------------------------===// 31 parsePWMAF({{"(x, y) : (y == 0)", "(x, y) -> (x, y)"}, in TEST() 32 {"(x, y) : (y - 1 >= 0, x == 0)", "(x, y) -> (x, y)"}, in TEST() 33 {"(x, y) : (-y - 1 >= 0, x == 0)", "(x, y) -> (x, y)"}}); in TEST() 35 parsePWMAF({{"(x, y) : (y == 0)", "(x, y) -> (x, 20*y)"}, in TEST() 36 {"(x, y) : (y - 1 >= 0, x == 0)", "(x, y) -> (30*x, y)"}, in TEST() 37 {"(x, y) : (-y - 1 > =0, x == 0)", "(x, y) -> (30*x, y)"}}); in TEST() [all …]
|
H A D | PresburgerRelationTest.cpp | 1 //===- PresburgerRelationTest.cpp - Tests for PresburgerRelation class ----===// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 23 {// (x, y) -> (x + N, y - N) in TEST() 24 "(x, y, a, b)[N] : (x - a + N == 0, y - b - N == 0)", in TEST() 25 // (x, y) -> (x + y, x - y) in TEST() 26 "(x, y, a, b)[N] : (a - x - y == 0, b - x + y == 0)", in TEST() 27 // (x, y) -> (x - y, y - x)} in TEST() 28 "(x, y, a, b)[N] : (a - x + y == 0, b - y + x == 0)"}, in TEST() 33 "(a, b)[N] : (a - 2 * b == 0)", in TEST() [all …]
|
/llvm-project/llvm/test/Transforms/InstCombine/ |
H A D | eq-of-parts.ll | 2 ; RUN: opt -S -passes=instcombine < %s | FileCheck %s 11 define i1 @eq_10(i32 %x, i32 %y) { 12 ; CHECK-LABEL: @eq_10( 13 ; CHECK-NEXT: [[TMP1:%.*]] = trunc i32 [[X:%.*]] to i16 14 ; CHECK-NEXT: [[TMP2:%.*]] = trunc i32 [[Y:%.*]] to i16 15 ; CHECK-NEXT: [[C_10:%.*]] = icmp eq i16 [[TMP1]], [[TMP2]] 16 ; CHECK-NEXT: ret i1 [[C_10]] 21 %y [all...] |
H A D | float-shrink-compare.ll | 2 ; RUN: opt -S -passes=instcombine < %s | FileCheck %s 3 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f6 [all...] |
H A D | minmax-of-minmax.ll | 2 ; RUN: opt -S -passes=instcombine < %s | FileCheck %s 4 define i32 @smax_of_smax_smin_commute0(i32 %x, i32 %y) { 5 ; CHECK-LABEL: @smax_of_smax_smin_commute0( 6 ; CHECK-NEXT: [[MAX:%.*]] = call i32 @llvm.smax.i32(i32 [[Y:%.*]], i32 [[X:%.*]]) 7 ; CHECK-NEXT: ret i32 [[MAX]] 9 %cmp1 = icmp slt i32 %x, %y 10 %min = select i1 %cmp1, i32 %x, i32 %y 11 %cmp2 = icmp slt i32 %y, %x 12 %max = select i1 %cmp2, i32 %x, i32 %y 18 define i32 @smax_of_smax_smin_commute1(i32 %x, i32 %y) { [all …]
|
H A D | and-or-icmp-min-max.ll | 2 ; RUN: opt < %s -passes=instcombine -S | FileCheck %s 12 ; (X == MAX) && (X < Y) --> false 16 define i1 @slt_and_max(i8 %x, i8 %y) { 17 ; CHECK-LABEL: @slt_and_max( 18 ; CHECK-NEXT: ret i1 false 20 %cmp = icmp slt i8 %x, %y 26 define i1 @slt_and_max_logical(i8 %x, i8 %y) { [all...] |
H A D | unsigned-add-overflow-check.ll | 2 ; RUN: opt < %s -passes=instcombine -S | FileCheck %s 5 ; (%x + %y) u< %x 7 ; (%x + %y) u< %y 9 ; @llvm.uadd.with.overflow(%x, %y) + extractvalue 11 define i1 @t0_basic(i8 %x, i8 %y) { 12 ; CHECK-LABEL: @t0_basic( 13 ; CHECK-NEXT: [[TMP1:%.*]] = xor i8 [[Y [all...] |
H A D | binop-and-shifts.ll | 2 ; RUN: opt < %s -passes=instcombine -S | FileCheck %s 4 define i8 @shl_and_and(i8 %x, i8 %y) { 5 ; CHECK-LABEL: @shl_and_and( 6 ; CHECK-NEXT: [[TMP1:%.*]] = and i8 [[Y:%.*]], [[X:%.*]] 7 ; CHECK-NEXT: [[TMP2:%.*]] = shl i8 [[TMP1]], 4 8 ; CHECK-NEXT: [[BW1:%.*]] = and i8 [[TMP2]], 80 9 ; CHECK-NEXT: ret i8 [[BW1]] 12 %shift2 = shl i8 %y, [all...] |
/llvm-project/clang/test/Misc/ |
H A D | diag-verify.cpp | 1 // RUN: not %clang_cc1 -fsyntax-only -verify %s 2>&1 | FileCheck %s 3 // Test the -verify flag. Each of the "x = y;" lines will produce a 4 // "use of undeclared identifier 'y'" error message. 9 x = y; // expected-error{{use of undeclared identifier 'y'}} in test() 10 x = y; // expected-error{{use of undeclared identifier}} in test() 11 x = y; // expected-error{{undeclared identifier 'y'}} in test() 12 x = y; // expected-error{{use of}} in test() 13 x = y; // expected-error{{undeclared identifier}} in test() 14 x = y; // expected-error{{'y'}} in test() 17 x = y; // expected-error{{use of undeclared identifier 'y' is fine}} in test() [all …]
|
/llvm-project/llvm/unittests/ADT/ |
H A D | DynamicAPIntTest.cpp | 1 //===- MPIntTest.cpp - Tests for MPInt ------------------------------------===// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 20 // This is for pretty-printing the test name with the name of the class in use. 38 EXPECT_EQ(Five * Five, 3 * Ten - Five); in TYPED_TEST() 43 EXPECT_EQ(-Ten % Seven, -10 % 7); in TYPED_TEST() 44 EXPECT_EQ(Ten % -Seven, 10 % -7); in TYPED_TEST() 45 EXPECT_EQ(-Ten % -Seven, -10 % -7); in TYPED_TEST() 48 EXPECT_EQ(-Ten / Seven, -10 / 7); in TYPED_TEST() 49 EXPECT_EQ(Ten / -Seven, 10 / -7); in TYPED_TEST() [all …]
|
/llvm-project/flang/test/Lower/ |
H A D | power-operator.f90 | 1 ! RUN: bbc -emit-fir %s -o - | FileCheck %s --check-prefixes="CHECK,PRECISE" 2 ! RUN: bbc --math-runtime=precise -emit-fir %s -o - | FileCheck %s --check-prefixes="PRECISE" 3 ! RUN: bbc --force-mlir-complex -emit-fir %s -o - | FileCheck %s --check-prefixes="FAST" 4 ! RUN: %flang_fc1 -emit-fir %s -o - | FileCheck %s --check-prefixes="CHECK,PRECISE" 5 ! RUN: %flang_fc1 -fapprox-func -emit-fir %s -o - | FileCheck %s --check-prefixes="CHECK,FAST" 6 ! RUN: %flang_fc1 -emit-fir -mllvm --math-runtime=precise %s -o - | FileCheck %s --check-prefixes="… 7 ! RUN: %flang_fc1 -emit-fir -mllvm --force-mlir-complex %s -o - | FileCheck %s --check-prefixes="FA… 11 ! CHECK-LABEL: pow_r4_i4 12 subroutine pow_r4_i4(x, y, z) argument 14 integer :: y local [all …]
|
/llvm-project/flang/test/Semantics/ |
H A D | modfile35.f90 | 9 generic :: operator(-) => p2 method 14 integer(8) pure function f(x, y) 16 integer, intent(in) :: y local 18 ! Operators resolve to type-bound operators in t1 19 subroutine test1(x, y, a, b) argument 21 integer :: y local 22 real :: a(x + y) 23 real :: b(x .lt. y) 25 ! Operators resolve to type-bound operators in t1, compile-time resolvable 26 subroutine test2(x, y, a, b) argument [all …]
|
H A D | modfile33.f90 | 1 ! RUN: %python %S/test_modfile.py %s %flang_fc1 -flogical-abbreviations -fxor-operator 3 ! Resolution of user-defined operators in expressions. 14 pure integer(8) function add_ll(x, y) 15 logical, intent(in) :: x, y local 17 pure integer(8) function add_li(x, y) 19 integer, intent(in) :: y local 21 pure integer(8) function add_tt(x, y) 23 type(t), intent(in) :: x, y local 27 pure integer(8) function div_tz(x, y) 30 complex, intent(in) :: y local [all …]
|
/llvm-project/clang-tools-extra/test/clang-tidy/checkers/llvm/ |
H A D | prefer-isa-or-dyn-cast-in-conditionals.cpp | 1 // RUN: %check_clang_tidy %s llvm-prefer-isa-or-dyn-cast-in-conditionals %t 4 struct Y; 8 X *cast(Y*); 9 bool baz(Y*); 12 template <class X, class Y> 13 bool isa(Y *); 14 template <class X, class Y> 15 X *cast(Y *); 16 template <class X, class Y> 17 X *dyn_cast(Y *); [all …]
|
/llvm-project/llvm/test/Analysis/BasicAA/ |
H A D | struct-geps.ll | 1 ; RUN: opt < %s -aa-pipeline=basic-aa -passes=aa-eval -print-all-alias-modref-inf [all...] |