llc: Change behavior of -mattr with existing attribute
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 9 Dec 2019 12:33:25 +0000 (18:03 +0530)
committerMatt Arsenault <arsenm2@gmail.com>
Thu, 16 Jan 2020 00:46:01 +0000 (19:46 -0500)
commit67ec8744d7e72b50a5db5038c9643584ce57cb0c
tree98bbaf0576acbf07a3d35fa952ec679923edc31d
parent4bafceced6a7641be7b090229c6ccef22cf55bff
llc: Change behavior of -mattr with existing attribute

Append this to the existing target-features attribute on the function.

Some flags ignore existing attributes, and some overwrite them. Move
towards consistently respecting existing attributes if present. Since
target features act as a state machine on their own, append to the
function attribute. The backend default added feature list, function
attributes, and -mattr will all be appended together, and the later
features can individually toggle the earlier settings.
llvm/include/llvm/CodeGen/CommandFlags.inc
llvm/test/CodeGen/WebAssembly/target-features.ll
llvm/test/Other/opt-override-mcpu-mattr.ll