[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / RISCV / attribute-with-option.s
blob749717cb7a5507a6b6901989a099c5b79294cd90
1 ## When a user specifies an architecture extension which conflicts with an
2 ## architecture attribute, we use the architecture attribute instead of the
3 ## command line option.
4 ##
5 ## This test uses option '-mattr=+e' to specify the "e" extension. However,
6 ## there is an architecture attribute in the file to specify rv32i. We will
7 ## use rv32i to assemble the file instead of rv32e.
9 # RUN: llvm-mc %s -triple=riscv32 -mattr=+e -filetype=obj -o - \
10 # RUN: | llvm-readobj -A - | FileCheck %s
12 .attribute arch, "rv32i2p0"
13 ## Invalid operand for RV32E, because x16 is an invalid register for RV32E.
14 ## Use RV32I to assemble, since it will not trigger an assembly error.
15 lui x16, 1
17 ## Check that the architecture attribute is not overridden by the command line
18 ## option.
19 # CHECK: Tag: 5
20 # CHECK-NEXT: TagName: arch
21 # CHECK-NEXT: Value: rv32i2p0