[PATCH] D111790: [AArch64][Driver][SVE] Allow -msve-vector-bits=+ syntax to mean no maximum vscale

2021-10-25 Thread Bradley Smith via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0ce46a1d43c6: [AArch64][Driver][SVE] Allow -msve-vector-bits=n+ syntax to mean no maximum… (authored by bsmith). Repository: rG LLVM Github

[PATCH] D111790: [AArch64][Driver][SVE] Allow -msve-vector-bits=+ syntax to mean no maximum vscale

2021-10-22 Thread Bradley Smith via Phabricator via cfe-commits
bsmith updated this revision to Diff 381511. bsmith added a comment. - Don't define SVE target bits macros when vscale min != max - Add tests for above change - Use correct (unsigned) version of getAsInteger Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D111790: [AArch64][Driver][SVE] Allow -msve-vector-bits=+ syntax to mean no maximum vscale

2021-10-21 Thread Paul Walker via Phabricator via cfe-commits
paulwalker-arm added inline comments. Comment at: clang/lib/Basic/Targets/AArch64.cpp:454 - if (Opts.ArmSveVectorBits) { -Builder.defineMacro("__ARM_FEATURE_SVE_BITS", Twine(Opts.ArmSveVectorBits)); + if (Opts.VScaleMin) { +

[PATCH] D111790: [AArch64][Driver][SVE] Allow -msve-vector-bits=+ syntax to mean no maximum vscale

2021-10-21 Thread Peter Waller via Phabricator via cfe-commits
peterwaller-arm added a comment. (Accept, but please run clang format) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111790/new/ https://reviews.llvm.org/D111790 ___ cfe-commits mailing list

[PATCH] D111790: [AArch64][Driver][SVE] Allow -msve-vector-bits=+ syntax to mean no maximum vscale

2021-10-18 Thread Bradley Smith via Phabricator via cfe-commits
bsmith updated this revision to Diff 380330. bsmith added a comment. - Avoid side-effects in assertions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111790/new/ https://reviews.llvm.org/D111790 Files: clang/include/clang/Basic/LangOptions.def

[PATCH] D111790: [AArch64][Driver][SVE] Allow -msve-vector-bits=+ syntax to mean no maximum vscale

2021-10-15 Thread Matt D. via Phabricator via cfe-commits
Matt added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1832 + else { +assert(!Val.getAsInteger(10, Bits)); +CmdArgs.push_back( There may be a way to avoid side-effects in assertions (`getAsInteger` changing the value

[PATCH] D111790: [AArch64][Driver][SVE] Allow -msve-vector-bits=+ syntax to mean no maximum vscale

2021-10-15 Thread Bradley Smith via Phabricator via cfe-commits
bsmith updated this revision to Diff 380015. bsmith added a comment. - Update sema checking for sve_vector_bits attribute to emit an error when the vscale min != max, i.e. when -mvse-vector-bits=+ is used - Add test to cover the above case Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D111790: [AArch64][Driver][SVE] Allow -msve-vector-bits=+ syntax to mean no maximum vscale

2021-10-15 Thread Bradley Smith via Phabricator via cfe-commits
bsmith added inline comments. Comment at: clang/lib/Sema/SemaType.cpp:7916 // The attribute vector size must match -msve-vector-bits. - if (VecSize != S.getLangOpts().ArmSveVectorBits) { + if (VecSize != S.getLangOpts().VScaleMin * 128) { S.Diag(Attr.getLoc(),

[PATCH] D111790: [AArch64][Driver][SVE] Allow -msve-vector-bits=+ syntax to mean no maximum vscale

2021-10-15 Thread Bradley Smith via Phabricator via cfe-commits
bsmith added inline comments. Comment at: clang/lib/Sema/SemaType.cpp:7916 // The attribute vector size must match -msve-vector-bits. - if (VecSize != S.getLangOpts().ArmSveVectorBits) { + if (VecSize != S.getLangOpts().VScaleMin * 128) { S.Diag(Attr.getLoc(),

[PATCH] D111790: [AArch64][Driver][SVE] Allow -msve-vector-bits=+ syntax to mean no maximum vscale

2021-10-15 Thread Paul Walker via Phabricator via cfe-commits
paulwalker-arm added inline comments. Comment at: clang/lib/Sema/SemaType.cpp:7893 // Attribute is unsupported if '-msve-vector-bits=' isn't specified. - if (!S.getLangOpts().ArmSveVectorBits) { + if (!S.getLangOpts().VScaleMin) { S.Diag(Attr.getLoc(),

[PATCH] D111790: [AArch64][Driver][SVE] Allow -msve-vector-bits=+ syntax to mean no maximum vscale

2021-10-14 Thread Bradley Smith via Phabricator via cfe-commits
bsmith updated this revision to Diff 379701. bsmith added a comment. - Remove mention of 128-bit chunks from help texts - Allow any positive integer value for -mvscale-{min,max}, not just powers of 2 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D111790: [AArch64][Driver][SVE] Allow -msve-vector-bits=+ syntax to mean no maximum vscale

2021-10-14 Thread Bradley Smith via Phabricator via cfe-commits
bsmith added a comment. In D111790#3063698 , @paulwalker-arm wrote: > Are the references to "128-bit chunks" for the vscale flags necessary? > That's really a nuisance of SVE that LLVM IR should not need to worry about. > Can we speak exclusively in

[PATCH] D111790: [AArch64][Driver][SVE] Allow -msve-vector-bits=+ syntax to mean no maximum vscale

2021-10-14 Thread Paul Walker via Phabricator via cfe-commits
paulwalker-arm added a comment. Are the references to "128-bit chunks" for the vscale flags necessary? That's really a nuisance of SVE that LLVM IR should not need to worry about. Can we speak exclusively in terms of vscale or is the "multiples of 128" required somewhere? Perhaps we're

[PATCH] D111790: [AArch64][Driver][SVE] Allow -msve-vector-bits=+ syntax to mean no maximum vscale

2021-10-14 Thread Bradley Smith via Phabricator via cfe-commits
bsmith created this revision. bsmith added reviewers: paulwalker-arm, peterwaller-arm, sdesmalen. Herald added subscribers: ctetreau, dexonsmith, dang, psnobl, kristof.beyls, tschuett. Herald added a reviewer: efriedma. bsmith requested review of this revision. Herald added a project: clang.