Commit bca2f655 by Jim Stichnoth

Subzero: Switch to AT&T asm syntax. I give up.

The main motivation is that -build-on-read introduces Intel-style asm output like: mov al, byte ptr [flags] and llvm-mc misinterprets the global symbol "flags" as the flags register. Further workarounds will likely cost more effort than switching over to AT&T syntax. Most of the lit tests don't need changing, since the asm text is generated by assembling and disassembling the llvm2ice asm output. There some LEAHACK TODOs that can be fixed, but that would change some of the instructions, so that can be a separate CL. The Operand emit() routines really ought to be moved entirely into the target-specific source files. BUG= none R=jvoung@chromium.org Review URL: https://codereview.chromium.org/695993004
parent 3d44fe8c
...@@ -110,7 +110,6 @@ if __name__ == '__main__': ...@@ -110,7 +110,6 @@ if __name__ == '__main__':
bitcode]) bitcode])
shellcmd(['llvm-mc', shellcmd(['llvm-mc',
'-arch=' + arch_map[args.target], '-arch=' + arch_map[args.target],
'-x86-asm-syntax=intel',
'-filetype=obj', '-filetype=obj',
'-o=' + obj_sz, '-o=' + obj_sz,
asm_sz]) asm_sz])
......
...@@ -202,8 +202,7 @@ def ProcessPexe(args, pexe, exe): ...@@ -202,8 +202,7 @@ def ProcessPexe(args, pexe, exe):
[pexe], [pexe],
echo=args.verbose) echo=args.verbose)
shellcmd(( shellcmd((
'llvm-mc -arch=x86 -x86-asm-syntax=intel -filetype=obj -o {obj} ' + 'llvm-mc -arch=x86 -filetype=obj -o {obj} {asm}'
'{asm}'
).format(asm=asm_sz, obj=obj_sz), echo=args.verbose) ).format(asm=asm_sz, obj=obj_sz), echo=args.verbose)
shellcmd(( shellcmd((
'objcopy --redefine-sym _start=_user_start {obj}' 'objcopy --redefine-sym _start=_user_start {obj}'
......
...@@ -405,7 +405,6 @@ void Cfg::emit() { ...@@ -405,7 +405,6 @@ void Cfg::emit() {
// TODO: need a per-file emit in addition to per-CFG // TODO: need a per-file emit in addition to per-CFG
Str << "# $LLVM_BIN_PATH/llvm-mc" Str << "# $LLVM_BIN_PATH/llvm-mc"
<< " -arch=x86" << " -arch=x86"
<< " -x86-asm-syntax=intel"
<< " -filetype=obj" << " -filetype=obj"
<< " -o=MyObj.o" << " -o=MyObj.o"
<< "\n\n"; << "\n\n";
......
...@@ -136,22 +136,22 @@ ...@@ -136,22 +136,22 @@
//#define X(tag, emit) //#define X(tag, emit)
#define ICETYPEX8632_TABLE \ #define ICETYPEX8632_TABLE \
/* tag, element type, cvt, sdss, pack, width */ \ /* tag, element type, cvt, sdss, pack, width, fld */ \
X(IceType_void, IceType_void, "?" , "" , "" , "???") \ X(IceType_void, IceType_void, "?" , "" , "" , "", "") \
X(IceType_i1, IceType_void, "si", "" , "" , "byte ptr") \ X(IceType_i1, IceType_void, "si", "" , "" , "b", "") \
X(IceType_i8, IceType_void, "si", "" , "" , "byte ptr") \ X(IceType_i8, IceType_void, "si", "" , "" , "b", "") \
X(IceType_i16, IceType_void, "si", "" , "" , "word ptr") \ X(IceType_i16, IceType_void, "si", "" , "" , "w", "") \
X(IceType_i32, IceType_void, "si", "" , "" , "dword ptr") \ X(IceType_i32, IceType_void, "si", "" , "" , "l", "") \
X(IceType_i64, IceType_void, "si", "" , "" , "qword ptr") \ X(IceType_i64, IceType_void, "si", "" , "" , "q", "") \
X(IceType_f32, IceType_void, "ss", "ss", "" , "dword ptr") \ X(IceType_f32, IceType_void, "ss", "ss", "" , "", "s") \
X(IceType_f64, IceType_void, "sd", "sd", "" , "qword ptr") \ X(IceType_f64, IceType_void, "sd", "sd", "" , "", "l") \
X(IceType_v4i1, IceType_i32 , "?" , "" , "d", "xmmword ptr") \ X(IceType_v4i1, IceType_i32 , "?" , "" , "d", "", "") \
X(IceType_v8i1, IceType_i16 , "?" , "" , "w", "xmmword ptr") \ X(IceType_v8i1, IceType_i16 , "?" , "" , "w", "", "") \
X(IceType_v16i1, IceType_i8 , "?" , "" , "b", "xmmword ptr") \ X(IceType_v16i1, IceType_i8 , "?" , "" , "b", "", "") \
X(IceType_v16i8, IceType_i8 , "?" , "" , "b", "xmmword ptr") \ X(IceType_v16i8, IceType_i8 , "?" , "" , "b", "", "") \
X(IceType_v8i16, IceType_i16 , "?" , "" , "w", "xmmword ptr") \ X(IceType_v8i16, IceType_i16 , "?" , "" , "w", "", "") \
X(IceType_v4i32, IceType_i32 , "dq", "" , "d", "xmmword ptr") \ X(IceType_v4i32, IceType_i32 , "dq", "" , "d", "", "") \
X(IceType_v4f32, IceType_f32 , "ps", "" , "" , "xmmword ptr") \ X(IceType_v4f32, IceType_f32 , "ps", "" , "" , "", "") \
//#define X(tag, elementty, cvt, sdss, width) //#define X(tag, elementty, cvt, sdss, pack, width, fld)
#endif // SUBZERO_SRC_ICEINSTX8632_DEF #endif // SUBZERO_SRC_ICEINSTX8632_DEF
...@@ -263,6 +263,7 @@ public: ...@@ -263,6 +263,7 @@ public:
}; };
static const char *getWidthString(Type Ty); static const char *getWidthString(Type Ty);
static const char *getFldString(Type Ty);
void dump(const Cfg *Func) const override; void dump(const Cfg *Func) const override;
protected: protected:
...@@ -514,10 +515,18 @@ public: ...@@ -514,10 +515,18 @@ public:
void emit(const Cfg *Func) const override { void emit(const Cfg *Func) const override {
Ostream &Str = Func->getContext()->getStrEmit(); Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 1); assert(getSrcSize() == 1);
Str << "\t" << Opcode << "\t"; Type SrcTy = getSrc(0)->getType();
getDest()->emit(Func); Type DestTy = getDest()->getType();
Str << ", "; Str << "\t" << Opcode << getWidthString(SrcTy);
// Movsx and movzx need both the source and dest type width letter
// to define the operation. The other unary operations have the
// same source and dest type and as a result need only one letter.
if (SrcTy != DestTy)
Str << getWidthString(DestTy);
Str << "\t";
getSrc(0)->emit(Func); getSrc(0)->emit(Func);
Str << ", ";
getDest()->emit(Func);
} }
void emitIAS(const Cfg *Func) const override { void emitIAS(const Cfg *Func) const override {
assert(getSrcSize() == 1); assert(getSrcSize() == 1);
...@@ -562,9 +571,9 @@ public: ...@@ -562,9 +571,9 @@ public:
Ostream &Str = Func->getContext()->getStrEmit(); Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 1); assert(getSrcSize() == 1);
Str << "\t" << Opcode << "\t"; Str << "\t" << Opcode << "\t";
getDest()->emit(Func);
Str << ", ";
getSrc(0)->emit(Func); getSrc(0)->emit(Func);
Str << ", ";
getDest()->emit(Func);
} }
void emitIAS(const Cfg *Func) const override { void emitIAS(const Cfg *Func) const override {
Type Ty = getDest()->getType(); Type Ty = getDest()->getType();
...@@ -780,11 +789,11 @@ public: ...@@ -780,11 +789,11 @@ public:
Ostream &Str = Func->getContext()->getStrEmit(); Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 3); assert(getSrcSize() == 3);
Str << "\t" << Opcode << "\t"; Str << "\t" << Opcode << "\t";
getDest()->emit(Func); getSrc(2)->emit(Func);
Str << ", "; Str << ", ";
getSrc(1)->emit(Func); getSrc(1)->emit(Func);
Str << ", "; Str << ", ";
getSrc(2)->emit(Func); getDest()->emit(Func);
} }
void emitIAS(const Cfg *Func) const override; void emitIAS(const Cfg *Func) const override;
void dump(const Cfg *Func) const override { void dump(const Cfg *Func) const override {
...@@ -822,11 +831,11 @@ public: ...@@ -822,11 +831,11 @@ public:
Ostream &Str = Func->getContext()->getStrEmit(); Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 2); assert(getSrcSize() == 2);
Str << "\t" << Opcode << "\t"; Str << "\t" << Opcode << "\t";
getDest()->emit(Func); getSrc(1)->emit(Func);
Str << ", "; Str << ", ";
getSrc(0)->emit(Func); getSrc(0)->emit(Func);
Str << ", "; Str << ", ";
getSrc(1)->emit(Func); getDest()->emit(Func);
} }
void emitIAS(const Cfg *Func) const override; void emitIAS(const Cfg *Func) const override;
void dump(const Cfg *Func) const override { void dump(const Cfg *Func) const override {
......
...@@ -470,7 +470,7 @@ void Variable::dump(const Cfg *Func, Ostream &Str) const { ...@@ -470,7 +470,7 @@ void Variable::dump(const Cfg *Func, Ostream &Str) const {
} }
} }
void ConstantRelocatable::emit(GlobalContext *Ctx) const { void ConstantRelocatable::emitWithoutDollar(GlobalContext *Ctx) const {
Ostream &Str = Ctx->getStrEmit(); Ostream &Str = Ctx->getStrEmit();
if (SuppressMangling) if (SuppressMangling)
Str << Name; Str << Name;
...@@ -483,6 +483,12 @@ void ConstantRelocatable::emit(GlobalContext *Ctx) const { ...@@ -483,6 +483,12 @@ void ConstantRelocatable::emit(GlobalContext *Ctx) const {
} }
} }
void ConstantRelocatable::emit(GlobalContext *Ctx) const {
Ostream &Str = Ctx->getStrEmit();
Str << "$";
emitWithoutDollar(Ctx);
}
void ConstantRelocatable::dump(const Cfg *Func, Ostream &Str) const { void ConstantRelocatable::dump(const Cfg *Func, Ostream &Str) const {
Str << "@"; Str << "@";
if (Func && !SuppressMangling) { if (Func && !SuppressMangling) {
......
...@@ -217,6 +217,7 @@ public: ...@@ -217,6 +217,7 @@ public:
using Constant::emit; using Constant::emit;
using Constant::dump; using Constant::dump;
void emit(GlobalContext *Ctx) const override; void emit(GlobalContext *Ctx) const override;
void emitWithoutDollar(GlobalContext *Ctx) const;
void dump(const Cfg *Func, Ostream &Str) const override; void dump(const Cfg *Func, Ostream &Str) const override;
static bool classof(const Operand *Operand) { static bool classof(const Operand *Operand) {
......
...@@ -107,7 +107,7 @@ CondX86::BrCond getIcmp32Mapping(InstIcmp::ICond Cond) { ...@@ -107,7 +107,7 @@ CondX86::BrCond getIcmp32Mapping(InstIcmp::ICond Cond) {
const struct TableTypeX8632Attributes_ { const struct TableTypeX8632Attributes_ {
Type InVectorElementType; Type InVectorElementType;
} TableTypeX8632Attributes[] = { } TableTypeX8632Attributes[] = {
#define X(tag, elementty, cvt, sdss, pack, width) \ #define X(tag, elementty, cvt, sdss, pack, width, fld) \
{ elementty } \ { elementty } \
, ,
ICETYPEX8632_TABLE ICETYPEX8632_TABLE
...@@ -245,7 +245,7 @@ namespace dummy3 { ...@@ -245,7 +245,7 @@ namespace dummy3 {
// Define a temporary set of enum values based on low-level table // Define a temporary set of enum values based on low-level table
// entries. // entries.
enum _tmp_enum { enum _tmp_enum {
#define X(tag, elementty, cvt, sdss, pack, width) _tmp_##tag, #define X(tag, elementty, cvt, sdss, pack, width, fld) _tmp_##tag,
ICETYPEX8632_TABLE ICETYPEX8632_TABLE
#undef X #undef X
_num _num
...@@ -257,7 +257,7 @@ ICETYPE_TABLE; ...@@ -257,7 +257,7 @@ ICETYPE_TABLE;
#undef X #undef X
// Define a set of constants based on low-level table entries, and // Define a set of constants based on low-level table entries, and
// ensure the table entry keys are consistent. // ensure the table entry keys are consistent.
#define X(tag, elementty, cvt, sdss, pack, width) \ #define X(tag, elementty, cvt, sdss, pack, width, fld) \
static const int _table2_##tag = _tmp_##tag; \ static const int _table2_##tag = _tmp_##tag; \
static_assert(_table1_##tag == _table2_##tag, \ static_assert(_table1_##tag == _table2_##tag, \
"Inconsistency between ICETYPEX8632_TABLE and ICETYPE_TABLE"); "Inconsistency between ICETYPEX8632_TABLE and ICETYPE_TABLE");
...@@ -506,20 +506,16 @@ IceString TargetX8632::getRegName(SizeT RegNum, Type Ty) const { ...@@ -506,20 +506,16 @@ IceString TargetX8632::getRegName(SizeT RegNum, Type Ty) const {
void TargetX8632::emitVariable(const Variable *Var) const { void TargetX8632::emitVariable(const Variable *Var) const {
Ostream &Str = Ctx->getStrEmit(); Ostream &Str = Ctx->getStrEmit();
if (Var->hasReg()) { if (Var->hasReg()) {
Str << getRegName(Var->getRegNum(), Var->getType()); Str << "%" << getRegName(Var->getRegNum(), Var->getType());
return; return;
} }
Str << InstX8632::getWidthString(Var->getType()); const Type Ty = IceType_i32;
Str << " [" << getRegName(getFrameOrStackReg(), IceType_i32);
int32_t Offset = Var->getStackOffset(); int32_t Offset = Var->getStackOffset();
if (!hasFramePointer()) if (!hasFramePointer())
Offset += getStackAdjustment(); Offset += getStackAdjustment();
if (Offset) { if (Offset)
if (Offset > 0)
Str << "+";
Str << Offset; Str << Offset;
} Str << "(%" << getRegName(getFrameOrStackReg(), Ty) << ")";
Str << "]";
} }
x86::Address TargetX8632::stackVarToAsmOperand(const Variable *Var) const { x86::Address TargetX8632::stackVarToAsmOperand(const Variable *Var) const {
...@@ -992,7 +988,7 @@ template <typename T> void TargetX8632::emitConstantPool() const { ...@@ -992,7 +988,7 @@ template <typename T> void TargetX8632::emitConstantPool() const {
assert(CharsPrinted >= 0 && assert(CharsPrinted >= 0 &&
(size_t)CharsPrinted < llvm::array_lengthof(buf)); (size_t)CharsPrinted < llvm::array_lengthof(buf));
(void)CharsPrinted; // avoid warnings if asserts are disabled (void)CharsPrinted; // avoid warnings if asserts are disabled
Str << "L$" << Ty << "$" << Const->getPoolEntryID() << ":\n"; Str << ".L$" << Ty << "$" << Const->getPoolEntryID() << ":\n";
Str << "\t" << T::AsmTag << "\t" << buf << "\t# " << T::TypeName << " " Str << "\t" << T::AsmTag << "\t" << buf << "\t# " << T::TypeName << " "
<< Value << "\n"; << Value << "\n";
} }
...@@ -4595,7 +4591,7 @@ void TargetX8632::postLower() { ...@@ -4595,7 +4591,7 @@ void TargetX8632::postLower() {
template <> void ConstantInteger32::emit(GlobalContext *Ctx) const { template <> void ConstantInteger32::emit(GlobalContext *Ctx) const {
Ostream &Str = Ctx->getStrEmit(); Ostream &Str = Ctx->getStrEmit();
Str << (int32_t)getValue(); Str << "$" << (int32_t)getValue();
} }
template <> void ConstantInteger64::emit(GlobalContext *) const { template <> void ConstantInteger64::emit(GlobalContext *) const {
...@@ -4604,14 +4600,12 @@ template <> void ConstantInteger64::emit(GlobalContext *) const { ...@@ -4604,14 +4600,12 @@ template <> void ConstantInteger64::emit(GlobalContext *) const {
template <> void ConstantFloat::emit(GlobalContext *Ctx) const { template <> void ConstantFloat::emit(GlobalContext *Ctx) const {
Ostream &Str = Ctx->getStrEmit(); Ostream &Str = Ctx->getStrEmit();
// It would be better to prefix with ".L$" instead of "L$", but Str << ".L$" << IceType_f32 << "$" << getPoolEntryID();
// llvm-mc doesn't parse "dword ptr [.L$foo]".
Str << "dword ptr [L$" << IceType_f32 << "$" << getPoolEntryID() << "]";
} }
template <> void ConstantDouble::emit(GlobalContext *Ctx) const { template <> void ConstantDouble::emit(GlobalContext *Ctx) const {
Ostream &Str = Ctx->getStrEmit(); Ostream &Str = Ctx->getStrEmit();
Str << "qword ptr [L$" << IceType_f64 << "$" << getPoolEntryID() << "]"; Str << ".L$" << IceType_f64 << "$" << getPoolEntryID();
} }
void ConstantUndef::emit(GlobalContext *) const { void ConstantUndef::emit(GlobalContext *) const {
......
...@@ -57,7 +57,7 @@ Address Address::ofConstPool(GlobalContext *Ctx, Assembler *Asm, ...@@ -57,7 +57,7 @@ Address Address::ofConstPool(GlobalContext *Ctx, Assembler *Asm,
llvm::raw_string_ostream StrBuf(Buffer); llvm::raw_string_ostream StrBuf(Buffer);
Type Ty = Imm->getType(); Type Ty = Imm->getType();
assert(llvm::isa<ConstantFloat>(Imm) || llvm::isa<ConstantDouble>(Imm)); assert(llvm::isa<ConstantFloat>(Imm) || llvm::isa<ConstantDouble>(Imm));
StrBuf << "L$" << Ty << "$" << Imm->getPoolEntryID(); StrBuf << ".L$" << Ty << "$" << Imm->getPoolEntryID();
const RelocOffsetT Offset = 0; const RelocOffsetT Offset = 0;
const bool SuppressMangling = true; const bool SuppressMangling = true;
Constant *Sym = Constant *Sym =
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
; This assumes that EAX is chosen as the first free register in O2 mode. ; This assumes that EAX is chosen as the first free register in O2 mode.
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s ; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
; Use -ffunction-sections so that the offsets reset for each function. ; Use -ffunction-sections so that the offsets reset for each function.
; RUN: %p2i -i %s --args -O2 --verbose none -ffunction-sections \ ; RUN: %p2i -i %s --args -O2 --verbose none -ffunction-sections \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
; follow a usual pattern). ; follow a usual pattern).
; RUN: %p2i -i %s --args -O2 -mattr=sse4.1 -sandbox --verbose none \ ; RUN: %p2i -i %s --args -O2 -mattr=sse4.1 -sandbox --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
......
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | FileCheck --check-prefix=CALLTARGETS %s ; RUN: | FileCheck --check-prefix=CALLTARGETS %s
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args -Om1 --verbose none \ ; RUN: %p2i -i %s --args -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \ ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
; RUN: | FileCheck --check-prefix=OPTM1 %s ; RUN: | FileCheck --check-prefix=OPTM1 %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
......
; This tries to be a comprehensive test of i8 operations. ; This tries to be a comprehensive test of i8 operations.
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args -Om1 --verbose none \ ; RUN: %p2i -i %s --args -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
......
; This file checks support for address mode optimization. ; This file checks support for address mode optimization.
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args -O2 -mattr=sse4.1 --verbose none \ ; RUN: %p2i -i %s --args -O2 -mattr=sse4.1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \ ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
; RUN: | FileCheck --check-prefix=SSE41 %s ; RUN: | FileCheck --check-prefix=SSE41 %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
; TODO(kschimpf) Find out why lc2i needed. ; TODO(kschimpf) Find out why lc2i needed.
; REQUIRES: allow_llvm_ir_as_input ; REQUIRES: allow_llvm_ir_as_input
; RUN: %lc2i -i %s --args --verbose none \ ; RUN: %lc2i -i %s --args --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %lc2i -i %s --args -O2 --verbose none \ ; RUN: %lc2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %lc2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %lc2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
......
; This is a basic test of the alloca instruction. ; This is a basic test of the alloca instruction.
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args -Om1 --verbose none \ ; RUN: %p2i -i %s --args -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
......
; Trivial smoke test of bitcast between integer and FP types. ; Trivial smoke test of bitcast between integer and FP types.
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args -Om1 --verbose none \ ; RUN: %p2i -i %s --args -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s ; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
; optimizations under Om1). ; optimizations under Om1).
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \ ; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \
; RUN: | FileCheck --check-prefix=O2 %s ; RUN: | FileCheck --check-prefix=O2 %s
; RUN: %p2i -i %s --args -Om1 --verbose none \ ; RUN: %p2i -i %s --args -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \ ; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \
; RUN: | FileCheck --check-prefix=OM1 %s ; RUN: | FileCheck --check-prefix=OM1 %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
; stack. ; stack.
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args -Om1 --verbose none \ ; RUN: %p2i -i %s --args -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \ ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
; RUN: | FileCheck --check-prefix=OPTM1 %s ; RUN: | FileCheck --check-prefix=OPTM1 %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
......
; Simple test of non-fused compare/branch. ; Simple test of non-fused compare/branch.
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args -Om1 --verbose none \ ; RUN: %p2i -i %s --args -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \ ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
; RUN: | FileCheck --check-prefix=OPTM1 %s ; RUN: | FileCheck --check-prefix=OPTM1 %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
......
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
; have [0] == i8v, [2] == i16v, [4] == i32v, [8] == i64v, etc. ; have [0] == i8v, [2] == i16v, [4] == i32v, [8] == i64v, etc.
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args -Om1 --verbose none \ ; RUN: %p2i -i %s --args -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
; (they cannot be constants and can only be reg/mem for x86). ; (they cannot be constants and can only be reg/mem for x86).
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args -Om1 --verbose none \ ; RUN: %p2i -i %s --args -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s ; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
; TODO(kschimpf) Find out why lc2i is needed. ; TODO(kschimpf) Find out why lc2i is needed.
; REQUIRES: allow_llvm_ir_as_input ; REQUIRES: allow_llvm_ir_as_input
; RUN: %lc2i -i %s --args -Om1 --target=x8632 --verbose none \ ; RUN: %lc2i -i %s --args -Om1 --target=x8632 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
declare i32 @memcpy_helper2(i32 %buf, i32 %buf2, i32 %n) declare i32 @memcpy_helper2(i32 %buf, i32 %buf2, i32 %n)
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | FileCheck --check-prefix=CALLTARGETS %s ; RUN: | FileCheck --check-prefix=CALLTARGETS %s
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args -Om1 --verbose none \ ; RUN: %p2i -i %s --args -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
......
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
; its value is used. ; its value is used.
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args -Om1 --verbose none \ ; RUN: %p2i -i %s --args -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s ; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
......
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
; http://llvm.org/docs/LangRef.html#simple-constants . ; http://llvm.org/docs/LangRef.html#simple-constants .
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -s -d -symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -s -d -symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args -Om1 --verbose none \ ; RUN: %p2i -i %s --args -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -s -d -symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -s -d -symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s ; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
; Also, we are currently using hlts for non-executable padding. ; Also, we are currently using hlts for non-executable padding.
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
define void @foo() { define void @foo() {
......
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
; Test -ias=1 and try to cross reference instructions w/ the symbol table. ; Test -ias=1 and try to cross reference instructions w/ the symbol table.
; RUN: %p2i -i %s --args --verbose none \ ; RUN: %p2i -i %s --args --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d -r --symbolize -x86-asm-syntax=intel - \ ; RUN: | llvm-objdump -d -r --symbolize -x86-asm-syntax=intel - \
; RUN: | FileCheck --check-prefix=IAS %s ; RUN: | FileCheck --check-prefix=IAS %s
; RUN: %p2i -i %s --args --verbose none \ ; RUN: %p2i -i %s --args --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d -t --symbolize -x86-asm-syntax=intel - \ ; RUN: | llvm-objdump -d -t --symbolize -x86-asm-syntax=intel - \
; RUN: | FileCheck --check-prefix=SYMTAB %s ; RUN: | FileCheck --check-prefix=SYMTAB %s
...@@ -102,27 +102,13 @@ entry: ...@@ -102,27 +102,13 @@ entry:
ret i32 0 ret i32 0
} }
; CHECK-LABEL: main ; CHECK-LABEL: main
; CHECK: .att_syntax ; CHECK: movl $PrimitiveInit,
; CHECK: leal PrimitiveInit, ; CHECK: movl $PrimitiveInitConst,
; CHECK: .intel_syntax ; CHECK: movl $PrimitiveInitStatic,
; CHECK: .att_syntax ; CHECK: movl $PrimitiveUninit,
; CHECK: leal PrimitiveInitConst, ; CHECK: movl $ArrayInit,
; CHECK: .intel_syntax ; CHECK: movl $ArrayInitPartial,
; CHECK: .att_syntax ; CHECK: movl $ArrayUninit,
; CHECK: leal PrimitiveInitStatic,
; CHECK: .intel_syntax
; CHECK: .att_syntax
; CHECK: leal PrimitiveUninit,
; CHECK: .intel_syntax
; CHECK: .att_syntax
; CHECK: leal ArrayInit,
; CHECK: .intel_syntax
; CHECK: .att_syntax
; CHECK: leal ArrayInitPartial,
; CHECK: .intel_syntax
; CHECK: .att_syntax
; CHECK: leal ArrayUninit,
; CHECK: .intel_syntax
; llvm-objdump does not indicate what symbol the mov/relocation applies to ; llvm-objdump does not indicate what symbol the mov/relocation applies to
; so we grep for "mov {{.*}}, OFFSET", along with "OFFSET {{.*}} symbol" in ; so we grep for "mov {{.*}}, OFFSET", along with "OFFSET {{.*}} symbol" in
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
; RUN: %p2i -i %s --args --verbose none -ffunction-sections | FileCheck %s ; RUN: %p2i -i %s --args --verbose none -ffunction-sections | FileCheck %s
; TODO(stichnot): The following line causes this test to fail. ; TODO(stichnot): The following line causes this test to fail.
; RUIN: %p2i -i %s --args --verbose none \ ; RUIN: %p2i -i %s --args --verbose none \
; RUIN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj ; RUIN: | llvm-mc -triple=i686-none-nacl -filetype=obj
; RUN: %p2i -i %s --args --verbose none --prefix Subzero -ffunction-sections \ ; RUN: %p2i -i %s --args --verbose none --prefix Subzero -ffunction-sections \
; RUN: | FileCheck --check-prefix=MANGLE %s ; RUN: | FileCheck --check-prefix=MANGLE %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
......
; This tests the optimization of atomic cmpxchg w/ following cmp + branches. ; This tests the optimization of atomic cmpxchg w/ following cmp + branches.
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \ ; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \
; RUN: | FileCheck --check-prefix=O2 %s ; RUN: | FileCheck --check-prefix=O2 %s
; RUN: %p2i -i %s --args -Om1 --verbose none \ ; RUN: %p2i -i %s --args -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \ ; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \
; RUN: | FileCheck --check-prefix=OM1 %s ; RUN: | FileCheck --check-prefix=OM1 %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
; applies to atomic load/stores). ; applies to atomic load/stores).
; ;
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d -r -symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d -r -symbolize -x86-asm-syntax=intel - | FileCheck %s
; TODO(jvoung): llvm-objdump doesn't symbolize global symbols well, so we ; TODO(jvoung): llvm-objdump doesn't symbolize global symbols well, so we
......
...@@ -3,15 +3,15 @@ ...@@ -3,15 +3,15 @@
; TODO(kschimpf) Find out why lc2i is needed. ; TODO(kschimpf) Find out why lc2i is needed.
; RUN: %lc2i -i %s --args -O2 --verbose none \ ; RUN: %lc2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \ ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
; RUN: | %iflc FileCheck %s ; RUN: | %iflc FileCheck %s
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \ ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
; RUN: | FileCheck --check-prefix=CHECKO2 %s ; RUN: | FileCheck --check-prefix=CHECKO2 %s
; RUN: %lc2i -i %s --args -Om1 --verbose none \ ; RUN: %lc2i -i %s --args -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \ ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
; RUN: | %iflc FileCheck %s ; RUN: | %iflc FileCheck %s
; RUN: %p2i -i %s --args --verbose none \ ; RUN: %p2i -i %s --args --verbose none \
......
...@@ -7,17 +7,17 @@ ...@@ -7,17 +7,17 @@
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | FileCheck --check-prefix=CALLTARGETS %s ; RUN: | FileCheck --check-prefix=CALLTARGETS %s
; RUN: %p2i -i %s --args -O2 --verbose none -sandbox \ ; RUN: %p2i -i %s --args -O2 --verbose none -sandbox \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args -Om1 --verbose none -sandbox \ ; RUN: %p2i -i %s --args -Om1 --verbose none -sandbox \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; Do another run w/ O2 and a different check-prefix (otherwise O2 and Om1 ; Do another run w/ O2 and a different check-prefix (otherwise O2 and Om1
; share the same "CHECK" prefix). This separate run helps check that ; share the same "CHECK" prefix). This separate run helps check that
; some code is optimized out. ; some code is optimized out.
; RUN: %p2i -i %s --args -O2 --verbose none -sandbox \ ; RUN: %p2i -i %s --args -O2 --verbose none -sandbox \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \ ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
; RUN: | FileCheck --check-prefix=CHECKO2REM %s ; RUN: | FileCheck --check-prefix=CHECKO2REM %s
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
; lowered to __nacl_read_tp instead of gs:[0x0]. ; lowered to __nacl_read_tp instead of gs:[0x0].
; We also know that because it's O2, it'll have the O2REM optimizations. ; We also know that because it's O2, it'll have the O2REM optimizations.
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \ ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
; RUN: | FileCheck --check-prefix=CHECKO2UNSANDBOXEDREM %s ; RUN: | FileCheck --check-prefix=CHECKO2UNSANDBOXEDREM %s
......
...@@ -18,81 +18,81 @@ entry: ...@@ -18,81 +18,81 @@ entry:
ret <4 x i32> %res ret <4 x i32> %res
; PROB50-LABEL: mul_v4i32: ; PROB50-LABEL: mul_v4i32:
; PROB50: nop # variant = 3 ; PROB50: nop # variant = 3
; PROB50: sub esp, 60 ; PROB50: subl $60, %esp
; PROB50: nop # variant = 4 ; PROB50: nop # variant = 4
; PROB50: movups xmmword ptr [esp+32], xmm0 ; PROB50: movups %xmm0, 32(%esp)
; PROB50: movups xmmword ptr [esp+16], xmm1 ; PROB50: movups %xmm1, 16(%esp)
; PROB50: nop # variant = 0 ; PROB50: nop # variant = 0
; PROB50: movups xmm0, xmmword ptr [esp+32] ; PROB50: movups 32(%esp), %xmm0
; PROB50: nop # variant = 4 ; PROB50: nop # variant = 4
; PROB50: pshufd xmm1, xmmword ptr [esp+32], 49 ; PROB50: pshufd $49, 32(%esp), %xmm1
; PROB50: pshufd xmm2, xmmword ptr [esp+16], 49 ; PROB50: pshufd $49, 16(%esp), %xmm2
; PROB50: pmuludq xmm0, xmmword ptr [esp+16] ; PROB50: pmuludq 16(%esp), %xmm0
; PROB50: pmuludq xmm1, xmm2 ; PROB50: pmuludq %xmm2, %xmm1
; PROB50: nop # variant = 0 ; PROB50: nop # variant = 0
; PROB50: shufps xmm0, xmm1, 136 ; PROB50: shufps $136, %xmm1, %xmm0
; PROB50: pshufd xmm1, xmm0, 216 ; PROB50: pshufd $216, %xmm0, %xmm1
; PROB50: nop # variant = 2 ; PROB50: nop # variant = 2
; PROB50: movups xmmword ptr [esp], xmm1 ; PROB50: movups %xmm1, (%esp)
; PROB50: movups xmm0, xmmword ptr [esp] ; PROB50: movups (%esp), %xmm0
; PROB50: add esp, 60 ; PROB50: addl $60, %esp
; PROB50: nop # variant = 0 ; PROB50: nop # variant = 0
; PROB50: ret ; PROB50: ret
; PROB90-LABEL: mul_v4i32: ; PROB90-LABEL: mul_v4i32:
; PROB90: nop # variant = 3 ; PROB90: nop # variant = 3
; PROB90: sub esp, 60 ; PROB90: subl $60, %esp
; PROB90: nop # variant = 4 ; PROB90: nop # variant = 4
; PROB90: movups xmmword ptr [esp+32], xmm0 ; PROB90: movups %xmm0, 32(%esp)
; PROB90: nop # variant = 3 ; PROB90: nop # variant = 3
; PROB90: movups xmmword ptr [esp+16], xmm1 ; PROB90: movups %xmm1, 16(%esp)
; PROB90: nop # variant = 2 ; PROB90: nop # variant = 2
; PROB90: movups xmm0, xmmword ptr [esp+32] ; PROB90: movups 32(%esp), %xmm0
; PROB90: nop # variant = 3 ; PROB90: nop # variant = 3
; PROB90: pshufd xmm1, xmmword ptr [esp+32], 49 ; PROB90: pshufd $49, 32(%esp), %xmm1
; PROB90: nop # variant = 4 ; PROB90: nop # variant = 4
; PROB90: pshufd xmm2, xmmword ptr [esp+16], 49 ; PROB90: pshufd $49, 16(%esp), %xmm2
; PROB90: nop # variant = 0 ; PROB90: nop # variant = 0
; PROB90: pmuludq xmm0, xmmword ptr [esp+16] ; PROB90: pmuludq 16(%esp), %xmm0
; PROB90: nop # variant = 2 ; PROB90: nop # variant = 2
; PROB90: pmuludq xmm1, xmm2 ; PROB90: pmuludq %xmm2, %xmm1
; PROB90: nop # variant = 3 ; PROB90: nop # variant = 3
; PROB90: shufps xmm0, xmm1, 136 ; PROB90: shufps $136, %xmm1, %xmm0
; PROB90: nop # variant = 4 ; PROB90: nop # variant = 4
; PROB90: pshufd xmm1, xmm0, 216 ; PROB90: pshufd $216, %xmm0, %xmm1
; PROB90: nop # variant = 2 ; PROB90: nop # variant = 2
; PROB90: movups xmmword ptr [esp], xmm1 ; PROB90: movups %xmm1, (%esp)
; PROB90: nop # variant = 4 ; PROB90: nop # variant = 4
; PROB90: movups xmm0, xmmword ptr [esp] ; PROB90: movups (%esp), %xmm0
; PROB90: nop # variant = 2 ; PROB90: nop # variant = 2
; PROB90: add esp, 60 ; PROB90: addl $60, %esp
; PROB90: nop # variant = 3 ; PROB90: nop # variant = 3
; PROB90: ret ; PROB90: ret
; MAXNOPS2-LABEL: mul_v4i32: ; MAXNOPS2-LABEL: mul_v4i32:
; MAXNOPS2: sub esp, 60 ; MAXNOPS2: subl $60, %esp
; MAXNOPS2: nop # variant = 4 ; MAXNOPS2: nop # variant = 4
; MAXNOPS2: movups xmmword ptr [esp+32], xmm0 ; MAXNOPS2: movups %xmm0, 32(%esp)
; MAXNOPS2: nop # variant = 0 ; MAXNOPS2: nop # variant = 0
; MAXNOPS2: nop # variant = 4 ; MAXNOPS2: nop # variant = 4
; MAXNOPS2: movups xmmword ptr [esp+16], xmm1 ; MAXNOPS2: movups %xmm1, 16(%esp)
; MAXNOPS2: movups xmm0, xmmword ptr [esp+32] ; MAXNOPS2: movups 32(%esp), %xmm0
; MAXNOPS2: nop # variant = 0 ; MAXNOPS2: nop # variant = 0
; MAXNOPS2: pshufd xmm1, xmmword ptr [esp+32], 49 ; MAXNOPS2: pshufd $49, 32(%esp), %xmm1
; MAXNOPS2: nop # variant = 2 ; MAXNOPS2: nop # variant = 2
; MAXNOPS2: pshufd xmm2, xmmword ptr [esp+16], 49 ; MAXNOPS2: pshufd $49, 16(%esp), %xmm2
; MAXNOPS2: pmuludq xmm0, xmmword ptr [esp+16] ; MAXNOPS2: pmuludq 16(%esp), %xmm0
; MAXNOPS2: nop # variant = 0 ; MAXNOPS2: nop # variant = 0
; MAXNOPS2: nop # variant = 3 ; MAXNOPS2: nop # variant = 3
; MAXNOPS2: pmuludq xmm1, xmm2 ; MAXNOPS2: pmuludq %xmm2, %xmm1
; MAXNOPS2: shufps xmm0, xmm1, 136 ; MAXNOPS2: shufps $136, %xmm1, %xmm0
; MAXNOPS2: pshufd xmm1, xmm0, 216 ; MAXNOPS2: pshufd $216, %xmm0, %xmm1
; MAXNOPS2: nop # variant = 3 ; MAXNOPS2: nop # variant = 3
; MAXNOPS2: movups xmmword ptr [esp], xmm1 ; MAXNOPS2: movups %xmm1, (%esp)
; MAXNOPS2: nop # variant = 0 ; MAXNOPS2: nop # variant = 0
; MAXNOPS2: movups xmm0, xmmword ptr [esp] ; MAXNOPS2: movups (%esp), %xmm0
; MAXNOPS2: nop # variant = 2 ; MAXNOPS2: nop # variant = 2
; MAXNOPS2: add esp, 60 ; MAXNOPS2: addl $60, %esp
; MAXNOPS2: nop # variant = 4 ; MAXNOPS2: nop # variant = 4
; MAXNOPS2: ret ; MAXNOPS2: ret
} }
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
; TODO(kschimpf) Find out why lc2i must be used. ; TODO(kschimpf) Find out why lc2i must be used.
; REQUIRES: allow_llvm_ir_as_input ; REQUIRES: allow_llvm_ir_as_input
; RUN: %lc2i -i %s --args -O2 --verbose none --phi-edge-split=0 \ ; RUN: %lc2i -i %s --args -O2 --verbose none --phi-edge-split=0 \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %lc2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %lc2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
; RUN: %lc2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s ; RUN: %lc2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
; when calling a function with the "returns twice" attribute. ; when calling a function with the "returns twice" attribute.
; RUN: %p2i -i %s --args -Om1 --verbose none \ ; RUN: %p2i -i %s --args -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
; integer variants of sdiv and srem. ; integer variants of sdiv and srem.
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args -Om1 --verbose none \ ; RUN: %p2i -i %s --args -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s ; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
......
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
; match lines. ; match lines.
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args -Om1 --verbose none \ ; RUN: %p2i -i %s --args -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s ; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
; into pairs of shifts. ; into pairs of shifts.
; RUN: %p2i -i %s --no-local-syms --args -O2 --verbose none \ ; RUN: %p2i -i %s --no-local-syms --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --no-local-syms --args -Om1 --verbose none \ ; RUN: %p2i -i %s --no-local-syms --args -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --no-local-syms --args --verbose none \ ; RUN: %p2i -i %s --no-local-syms --args --verbose none \
; RUN: | FileCheck --check-prefix=ERRORS %s ; RUN: | FileCheck --check-prefix=ERRORS %s
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
; The O2 check patterns represent the best code currently achieved. ; The O2 check patterns represent the best code currently achieved.
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args -Om1 --verbose none \ ; RUN: %p2i -i %s --args -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \ ; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \
; RUN: | FileCheck --check-prefix=OPTM1 %s ; RUN: | FileCheck --check-prefix=OPTM1 %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
......
; Tests various aspects of i1 related lowering. ; Tests various aspects of i1 related lowering.
; RUN: %p2i -i %s -a -O2 --verbose none \ ; RUN: %p2i -i %s -a -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s -a -Om1 --verbose none \ ; RUN: %p2i -i %s -a -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s -a --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s -a --verbose none | FileCheck --check-prefix=ERRORS %s
; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s ; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
......
; This test checks that undef values are represented as zero. ; This test checks that undef values are represented as zero.
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args -Om1 --verbose none \ ; RUN: %p2i -i %s --args -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args -O2 -mattr=sse4.1 --verbose none \ ; RUN: %p2i -i %s --args -O2 -mattr=sse4.1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args -Om1 -mattr=sse4.1 --verbose none \ ; RUN: %p2i -i %s --args -Om1 -mattr=sse4.1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s ; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
......
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
; RUN: %p2i -i %s -a -O2 --verbose none \ ; RUN: %p2i -i %s -a -O2 --verbose none \
; RUN: | FileCheck --check-prefix=CALLTARGETS %s ; RUN: | FileCheck --check-prefix=CALLTARGETS %s
; RUN: %p2i -i %s -a -O2 --verbose none \ ; RUN: %p2i -i %s -a -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s -a -Om1 --verbose none \ ; RUN: %p2i -i %s -a -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s -a --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s -a --verbose none | FileCheck --check-prefix=ERRORS %s
; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s ; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
; calling convention for vectors. ; calling convention for vectors.
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args -Om1 --verbose none \ ; RUN: %p2i -i %s --args -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \ ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
; RUN: | FileCheck --check-prefix=OPTM1 %s ; RUN: | FileCheck --check-prefix=OPTM1 %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
......
...@@ -7,17 +7,17 @@ ...@@ -7,17 +7,17 @@
; RUN: %p2i -i %s -a -O2 --verbose none\ ; RUN: %p2i -i %s -a -O2 --verbose none\
; RUN: | FileCheck --check-prefix=CALLTARGETS %s ; RUN: | FileCheck --check-prefix=CALLTARGETS %s
; RUN: %p2i -i %s -a -O2 --verbose none \ ; RUN: %p2i -i %s -a -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s -a -Om1 --verbose none \ ; RUN: %p2i -i %s -a -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s -a -O2 -mattr=sse4.1 --verbose none \ ; RUN: %p2i -i %s -a -O2 -mattr=sse4.1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \ ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
; RUN: | FileCheck --check-prefix=SSE41 %s ; RUN: | FileCheck --check-prefix=SSE41 %s
; RUN: %p2i -i %s -a -Om1 -mattr=sse4.1 --verbose none \ ; RUN: %p2i -i %s -a -Om1 -mattr=sse4.1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \ ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
; RUN: | FileCheck --check-prefix=SSE41 %s ; RUN: | FileCheck --check-prefix=SSE41 %s
; RUN: %p2i -i %s -a --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s -a --verbose none | FileCheck --check-prefix=ERRORS %s
......
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | FileCheck --check-prefix=CALLTARGETS %s ; RUN: | FileCheck --check-prefix=CALLTARGETS %s
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args -Om1 --verbose none \ ; RUN: %p2i -i %s --args -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \ ; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \
; RUN: | FileCheck --check-prefix=OPTM1 %s ; RUN: | FileCheck --check-prefix=OPTM1 %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
......
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | FileCheck --check-prefix=CALLTARGETS %s ; RUN: | FileCheck --check-prefix=CALLTARGETS %s
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args -Om1 --verbose none \ ; RUN: %p2i -i %s --args -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s ; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
; instruction. ; instruction.
; RUN: %p2i -i %s -a -O2 --verbose none \ ; RUN: %p2i -i %s -a -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s -a -Om1 --verbose none \ ; RUN: %p2i -i %s -a -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s -a --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s -a --verbose none | FileCheck --check-prefix=ERRORS %s
; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s ; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
; instruction. ; instruction.
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args -Om1 --verbose none \ ; RUN: %p2i -i %s --args -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s ; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
......
; This checks support for insertelement and extractelement. ; This checks support for insertelement and extractelement.
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args -Om1 --verbose none \ ; RUN: %p2i -i %s --args -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args -O2 -mattr=sse4.1 --verbose none \ ; RUN: %p2i -i %s --args -O2 -mattr=sse4.1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \ ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
; RUN: | FileCheck --check-prefix=SSE41 %s ; RUN: | FileCheck --check-prefix=SSE41 %s
; RUN: %p2i -i %s --args -Om1 -mattr=sse4.1 --verbose none \ ; RUN: %p2i -i %s --args -Om1 -mattr=sse4.1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \ ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
; RUN: | FileCheck --check-prefix=SSE41 %s ; RUN: | FileCheck --check-prefix=SSE41 %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
......
; This file tests support for the select instruction with vector valued inputs. ; This file tests support for the select instruction with vector valued inputs.
; RUN: %p2i -i %s --args -O2 --verbose none \ ; RUN: %p2i -i %s --args -O2 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args -Om1 --verbose none \ ; RUN: %p2i -i %s --args -Om1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
; RUN: %p2i -i %s --args -O2 -mattr=sse4.1 --verbose none \ ; RUN: %p2i -i %s --args -O2 -mattr=sse4.1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \ ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
; RUN: | FileCheck --check-prefix=SSE41 %s ; RUN: | FileCheck --check-prefix=SSE41 %s
; RUN: %p2i -i %s --args -Om1 -mattr=sse4.1 --verbose none \ ; RUN: %p2i -i %s --args -Om1 -mattr=sse4.1 --verbose none \
; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \ ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
; RUN: | FileCheck --check-prefix=SSE41 %s ; RUN: | FileCheck --check-prefix=SSE41 %s
; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment