Conanap updated this revision to Diff 361754. Conanap added a comment. Herald added a subscriber: kbarton.
Updated test cases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106817/new/ https://reviews.llvm.org/D106817 Files: clang/lib/Sema/SemaChecking.cpp clang/test/CodeGen/builtins-ppc-xlcompat-error.c Index: clang/test/CodeGen/builtins-ppc-xlcompat-error.c =================================================================== --- clang/test/CodeGen/builtins-ppc-xlcompat-error.c +++ clang/test/CodeGen/builtins-ppc-xlcompat-error.c @@ -17,9 +17,11 @@ void test_trap(void) { #ifdef __PPC64__ - __tdw(lla, llb, 50); //expected-error {{argument value 50 is outside the valid range [0, 31]}} + __tdw(lla, llb, 50); //expected-error {{argument value 50 is outside the valid range [1, 31]}} + __tdw(lla, llb, 0); //expected-error {{argument value 0 is outside the valid range [1, 31]}} #endif - __tw(ia, ib, 50); //expected-error {{argument value 50 is outside the valid range [0, 31]}} + __tw(ia, ib, 50); //expected-error {{argument value 50 is outside the valid range [1, 31]}} + __tw(ia, ib, 0); //expected-error {{argument value 0 is outside the valid range [1, 31]}} } void test_builtin_ppc_rldimi() { Index: clang/lib/Sema/SemaChecking.cpp =================================================================== --- clang/lib/Sema/SemaChecking.cpp +++ clang/lib/Sema/SemaChecking.cpp @@ -3395,7 +3395,7 @@ return SemaBuiltinConstantArgRange(TheCall, 3, 0, 7); case PPC::BI__builtin_ppc_tw: case PPC::BI__builtin_ppc_tdw: - return SemaBuiltinConstantArgRange(TheCall, 2, 0, 31); + return SemaBuiltinConstantArgRange(TheCall, 2, 1, 31); case PPC::BI__builtin_ppc_cmpeqb: case PPC::BI__builtin_ppc_setb: case PPC::BI__builtin_ppc_maddhd:
Index: clang/test/CodeGen/builtins-ppc-xlcompat-error.c =================================================================== --- clang/test/CodeGen/builtins-ppc-xlcompat-error.c +++ clang/test/CodeGen/builtins-ppc-xlcompat-error.c @@ -17,9 +17,11 @@ void test_trap(void) { #ifdef __PPC64__ - __tdw(lla, llb, 50); //expected-error {{argument value 50 is outside the valid range [0, 31]}} + __tdw(lla, llb, 50); //expected-error {{argument value 50 is outside the valid range [1, 31]}} + __tdw(lla, llb, 0); //expected-error {{argument value 0 is outside the valid range [1, 31]}} #endif - __tw(ia, ib, 50); //expected-error {{argument value 50 is outside the valid range [0, 31]}} + __tw(ia, ib, 50); //expected-error {{argument value 50 is outside the valid range [1, 31]}} + __tw(ia, ib, 0); //expected-error {{argument value 0 is outside the valid range [1, 31]}} } void test_builtin_ppc_rldimi() { Index: clang/lib/Sema/SemaChecking.cpp =================================================================== --- clang/lib/Sema/SemaChecking.cpp +++ clang/lib/Sema/SemaChecking.cpp @@ -3395,7 +3395,7 @@ return SemaBuiltinConstantArgRange(TheCall, 3, 0, 7); case PPC::BI__builtin_ppc_tw: case PPC::BI__builtin_ppc_tdw: - return SemaBuiltinConstantArgRange(TheCall, 2, 0, 31); + return SemaBuiltinConstantArgRange(TheCall, 2, 1, 31); case PPC::BI__builtin_ppc_cmpeqb: case PPC::BI__builtin_ppc_setb: case PPC::BI__builtin_ppc_maddhd:
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits