New issue
Advanced search Search tips

Issue 811241 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows
Pri: 3
Type: Bug



Sign in to add a comment

ToTAndroid x64 failing with assert: "REX.W requires 64bit mode."

Project Member Reported by h...@chromium.org, Feb 12 2018

Issue description

From https://ci.chromium.org/buildbot/chromium.clang/ToTAndroid%20x64/311

FAILED: android_clang_x86/obj/skia/skia/SkEdgeClipper.o 
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF android_clang_x86/obj/skia/skia/SkEdgeClipper.o.d -DV8_DEPRECATION_WARNINGS -DDCHECK_ALWAYS_ON=1 -DNO_TCMALLOC -DSAFE_BROWSING_DB_REMOTE -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -DANDROID -DHAVE_SYS_UIO_H -DANDROID_NDK_VERSION_ROLL=r16_1 -DCR_CLANG_REVISION=\"324858\" -DCOMPONENT_BUILD -D__GNU_SOURCE=1 -DCHROMIUM_CXX_TWEAK_INLINES -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_HAS_PNG_LIBRARY -DSK_HAS_WEBP_LIBRARY -DSK_HAS_JPEG_LIBRARY -DSKIA_DLL -DGR_GL_IGNORE_ES3_MSAA=0 -DSK_SUPPORT_GPU=1 -DSK_BUILD_FOR_ANDROID -DUSE_CHROMIUM_SKIA -DSK_FREETYPE_MINIMUM_RUNTIME_VERSION=\(\(\(FREETYPE_MAJOR\)\ \*\ 0x01000000\)\ \|\ \(\(FREETYPE_MINOR\)\ \*\ 0x00010000\)\ \|\ \(\(FREETYPE_PATCH\)\ \*\ 0x00000100\)\) -DSKIA_IMPLEMENTATION=1 -DSK_GAMMA_APPLY_TO_A8 -DSK_GAMMA_EXPONENT=1.4 -DSK_GAMMA_CONTRAST=0.0 -DSK_DEFAULT_FONT_CACHE_LIMIT=1048576 -DWEBP_EXTERN=extern -DFT_CONFIG_CONFIG_H=\"freetype-custom-config/ftconfig.h\" -DFT_CONFIG_MODULES_H=\"freetype-custom-config/ftmodule.h\" -DFT_CONFIG_OPTIONS_H=\"freetype-custom-config/ftoption.h\" -DWITHOUT_HARFBUZZ -DUSE_LIBJPEG_TURBO=1 -DXML_STATIC -I../.. -Iandroid_clang_x86/gen -I../../skia/config -I../../skia/ext -I../../third_party/skia/include/c -I../../third_party/skia/include/config -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/encode -I../../third_party/skia/include/gpu -I../../third_party/skia/include/images -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pdf -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/src/gpu -I../../third_party/skia/src/sksl -I../../third_party/skia/include/codec -I../../third_party/skia/include/private -I../../third_party/skia/include/client/android -I../../third_party/skia/src/codec -I../../third_party/skia/src/core -I../../third_party/skia/src/image -I../../third_party/skia/src/images -I../../third_party/skia/src/opts -I../../third_party/skia/src/pdf -I../../third_party/skia/src/ports -I../../third_party/skia/src/shaders -I../../third_party/skia/src/shaders/gradients -I../../third_party/skia/src/sfnt -I../../third_party/skia/src/utils -I../../third_party/skia/src/lazy -I../../third_party/skia/third_party/gif -I../../third_party/skia/src/effects/gradients -I../../third_party/libwebp/src -I../../third_party/libpng -I../../third_party/zlib -I../../third_party/freetype/include -I../../third_party/freetype/src/include -I../../third_party/harfbuzz-ng/src -I../../third_party/libjpeg_turbo -I../../third_party/android_ndk/sources/android/cpufeatures -I../../third_party/expat/files/lib -I../../third_party/sfntly/src/cpp/src -fno-strict-aliasing --param=ssp-buffer-size=4 -fno-stack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -fcolor-diagnostics -no-canonical-prefixes -ffunction-sections -fno-short-enums --target=i686-linux-android -isystem../../third_party/android_ndk/sysroot/usr/include/i686-linux-android -D__ANDROID_API__=16 -D__NDK_FPABI__= -DHAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC=1 -m32 -msse2 -mfpmath=sse -mmmx -momit-leaf-frame-pointer -fno-omit-frame-pointer -g2 -ggnu-pubnames -fvisibility=hidden -Werror -Wall -Wno-unused-variable -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Wno-enum-compare-switch -Wno-tautological-unsigned-zero-compare -Wno-null-pointer-arithmetic -Wno-tautological-constant-compare -Wtautological-constant-out-of-range-compare -O2 -fno-ident -fdata-sections -ffunction-sections -std=gnu++14 -fno-exceptions -fno-rtti -isystem../../third_party/android_ndk/sources/cxx-stl/llvm-libc++/include -isystem../../third_party/android_ndk/sources/cxx-stl/llvm-libc++abi/include -isystem../../third_party/android_ndk/sources/android/support/include --sysroot=../../third_party/android_ndk/sysroot -fvisibility-inlines-hidden -c ../../third_party/skia/src/core/SkEdgeClipper.cpp -o android_clang_x86/obj/skia/skia/SkEdgeClipper.o
clang++: /b/c/b/ToTAndroid_x64/src/third_party/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp:1138: bool {anonymous}::X86MCCodeEmitter::emitOpcodePrefix(uint64_t, unsigned int&, int, const llvm::MCInst&, const llvm::MCInstrDesc&, const llvm::MCSubtargetInfo&, llvm::raw_ostream&) const: Assertion `!(TSFlags & X86II::REX_W) && "REX.W requires 64bit mode."' failed.
#0 0x000000000226bfaa llvm::sys::PrintStackTrace(llvm::raw_ostream&) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x226bfaa)
#1 0x000000000226a08e llvm::sys::RunSignalHandlers() (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x226a08e)
#2 0x000000000226a1f2 SignalHandler(int) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x226a1f2)
#3 0x00007f65ec715330 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x00007f65eb304c37 gsignal /build/eglibc-ripdx6/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#5 0x00007f65eb308028 abort /build/eglibc-ripdx6/eglibc-2.19/stdlib/abort.c:91:0
#6 0x00007f65eb2fdbf6 __assert_fail_base /build/eglibc-ripdx6/eglibc-2.19/assert/assert.c:92:0
#7 0x00007f65eb2fdca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#8 0x0000000001809424 (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x1809424)
#9 0x0000000001fbe464 llvm::MCELFStreamer::EmitInstToData(llvm::MCInst const&, llvm::MCSubtargetInfo const&) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x1fbe464)
#10 0x0000000001fd17c2 llvm::MCObjectStreamer::EmitInstructionImpl(llvm::MCInst const&, llvm::MCSubtargetInfo const&) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x1fd17c2)
#11 0x0000000001fd180b llvm::MCObjectStreamer::EmitInstruction(llvm::MCInst const&, llvm::MCSubtargetInfo const&, bool) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x1fd180b)
#12 0x00000000015fc320 llvm::X86AsmPrinter::EmitAndCountInstruction(llvm::MCInst&) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x15fc320)
#13 0x00000000016004df llvm::X86AsmPrinter::EmitInstruction(llvm::MachineInstr const*) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x16004df)
#14 0x00000000028a52c9 llvm::AsmPrinter::EmitFunctionBody() (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x28a52c9)
#15 0x00000000015f72d9 llvm::X86AsmPrinter::runOnMachineFunction(llvm::MachineFunction&) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x15f72d9)
#16 0x0000000001ac1ec5 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x1ac1ec5)
#17 0x0000000001de0773 llvm::FPPassManager::runOnFunction(llvm::Function&) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x1de0773)
#18 0x0000000001de081c llvm::FPPassManager::runOnModule(llvm::Module&) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x1de081c)
#19 0x0000000001de10bf llvm::legacy::PassManagerImpl::run(llvm::Module&) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x1de10bf)
#20 0x000000000240b568 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x240b568)
#21 0x000000000240c842 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x240c842)
#22 0x0000000002b3698b clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x2b3698b)
#23 0x0000000002f6ad82 clang::ParseAST(clang::Sema&, bool, bool) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x2f6ad82)
#24 0x0000000002b35fcf clang::CodeGenAction::ExecuteAction() (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x2b35fcf)
#25 0x00000000027d1e96 clang::FrontendAction::Execute() (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x27d1e96)
#26 0x00000000027a750e clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x27a750e)
#27 0x0000000002866682 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x2866682)
#28 0x0000000000c01ed8 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0xc01ed8)
#29 0x0000000000b90d4c main (../../third_party/llvm-build/Release+Asserts/bin/clang+++0xb90d4c)
#30 0x00007f65eb2eff45 __libc_start_main /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:321:0
#31 0x0000000000bfcc79 _start (../../third_party/llvm-build/Release+Asserts/bin/clang+++0xbfcc79)
 

Comment 1 by h...@chromium.org, Feb 12 2018

SkEdgeClipper-69c7be.cpp
4.3 MB View Download
SkEdgeClipper-69c7be.sh
13.7 KB View Download

Comment 2 by h...@chromium.org, Feb 12 2018

Labels: OS-Windows
Bisecting now.

The same assert fires on Windows: https://ci.chromium.org/buildbot/chromium.clang/ToTWin/964

Comment 3 by h...@chromium.org, Feb 12 2018

Status: Started (was: Assigned)
Bisection points to this one:

Author: lsaba
Date: Sun Feb 11 01:34:12 2018
New Revision: 324835

URL: http://llvm.org/viewvc/llvm-project?rev=324835&view=rev
Log:
[X86] Reduce Store Forward Block issues in HW

If a load follows a store and reloads data that the store has written to memory, Intel microarchitectures can in many cases forward the data directly from the store to the load, This "store forwarding" saves cycles by enabling the load to directly obtain the data instead of accessing the data from cache or memory.
A "store forward block" occurs in cases that a store cannot be forwarded to the load. The most typical case of store forward block on Intel Core microarchiticutre that a small store cannot be forwarded to a large load.
The estimated penalty for a store forward block is ~13 cycles.

This pass tries to recognize and handle cases where "store forward block" is created by the compiler when lowering memcpy calls to a sequence
of a load and a store.

The pass currently only handles cases where memcpy is lowered to XMM/YMM registers, it tries to break the memcpy into smaller copies.
breaking the memcpy should be possible since there is no atomicity guarantee for loads and stores to XMM/YMM.

Change-Id: I620b6dc91583ad9a1444591e3ddc00dd25d81748

Comment 5 by h...@chromium.org, Feb 12 2018

Status: Fixed (was: Started)
Reverted in r324887.

Comment 6 by h...@chromium.org, Feb 12 2018

Cc: thakis@chromium.org
+thakis fyi. Looks like you're sheriff this week

Comment 7 by h...@chromium.org, Feb 12 2018

There are reports of miscompiles due to the same change internally, with some protobuf field not getting initialized properly. I suspect the same problem is causing the test failures we're seeing e.g. here https://ci.chromium.org/buildbot/chromium.clang/ToTWin64/920

Sign in to add a comment